Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id DE41C63327C for ; Tue, 7 Apr 2009 10:36:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 31416-03 for ; Tue, 7 Apr 2009 10:36:27 -0300 (ADT) X-Greylist: delayed 00:06:39.974825 by SQLgrey-1.7.6 Received: from smtp118.mail.mud.yahoo.com (smtp118.mail.mud.yahoo.com [209.191.84.167]) by mail.postgresql.org (Postfix) with SMTP id BF3EA632E69 for ; Tue, 7 Apr 2009 10:36:34 -0300 (ADT) Received: (qmail 50474 invoked from network); 7 Apr 2009 13:29:52 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:Content-Type; b=xZX+bGLSOaI9gYFjrTxyqSixfpbUq16A8AEbNQ99WcQKXbBzVNw7+ySCU4n3NLrDbOvJmY3agn03enNV/IGWhGVtE3+r70F0vId2CYMs4xo5YFV3/LOswpO+w0ryiwkwyclThsaP7HobNW7T3XMIZtn3Mmoj2pCf1/ft4k3OwRo= ; Received: from unknown (HELO ?192.168.1.2?) (mail_4brad@121.73.20.162 with plain) by smtp118.mail.mud.yahoo.com with SMTP; 7 Apr 2009 13:29:51 -0000 X-YMail-OSG: FqLYsV4VM1lKPz_j5jyOVux.IZdGCZKSPoIb93.gr9msmC5GGHdGM_2wk70lVXT.6A008tW3O969iRVzJvQ4aFC1Tpy7.q9G123fWJ8MEhJQPh_2O75Is6Vnuz0Afw1FSK3KyYNXeVNi8Fm_K4E1c0IY1.8s_8oP2SZUM39OiCd7GY6gm31DoBIU2lyDzr_skxwBVg422VJLaxEQaX_m.o6S0ffhriK_l_4_55i3nJV9Zakua5vseSM_jMGXsyi.DeA8k7VR5_I7ZUPnkK9zRMN9r35qhw.YFXAqRlqYUy1snysRheqW X-Yahoo-Newman-Property: ymail-3 Message-ID: <49DB559F.3030805@yahoo.co.uk> Date: Wed, 08 Apr 2009 01:31:11 +1200 From: Brad Milne User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: BLOB help - yes I've read around! Content-Type: multipart/alternative; boundary="------------030902020205010700060807" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200904/10 X-Sequence-Number: 19457 This is a multi-part message in MIME format. --------------030902020205010700060807 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi all I'm a Java dev, new to postgres. I've just migrated an app during development from Derby to Postgres (due to better indexing features), but am very confused by the failing BLOB implementations. PostgreSQL: 8.3.7 PostgreSQL-JDBC: 8.3-604 JDK: 6 A lot of what I've seen in searches and even in the google groups page, seems to be related to older jdbc drivers, where BLOBs were supported, both for OID and bytea. I'm currently getting 'unimplemented' exceptions doing anything with BLOBs. My application saves sound files as byte arrays to the database. Q1: Given that it's sound and not text, would it be safe to use bytea given that certain characters need to be escaped? Q2: How on earth do I use the BLOB methods? In particular setBlob(int parameterIndex, InputStream inputStream) and/or createBlob() and setBlob(int parameterIndex, Blob x)? Thanks a lot Brad --------------030902020205010700060807 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi all

I'm a Java dev, new to postgres. I've just migrated an app during development from Derby to Postgres (due to better indexing features), but am very confused by the failing BLOB implementations.

PostgreSQL: 8.3.7
PostgreSQL-JDBC: 8.3-604
JDK: 6

A lot of what I've seen in searches and even in the google groups page, seems to be related to older jdbc drivers, where BLOBs were supported, both for OID and bytea. I'm currently getting 'unimplemented' exceptions doing anything with BLOBs.

My application saves sound files as byte arrays to the database.

Q1: Given that it's sound and not text, would it be safe to use bytea given that certain characters need to be escaped?
Q2: How on earth do I use the BLOB methods? In particular setBlob(int parameterIndex, InputStream inputStream) and/or createBlob() and setBlob(int parameterIndex, Blob x)?

Thanks a lot
Brad
--------------030902020205010700060807--