Re: Writing binary - UPDATE - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: Writing binary - UPDATE
Date
Msg-id 3F560AE7.2090203@xythos.com
Whole thread Raw
In response to Writing binary - UPDATE  (Andreas Bauer <buki@gmx.net>)
List pgsql-jdbc
Andreas,

You need to follow the documentation for the version of the driver you
are using.  From what you have included below, it looks like you are
using a 7.2 or higher version of the driver along with the
setBytes/getBytes methods.  In these driver versions the
setBytes/getBytes methods opperate on the 'bytea' datatype, not oid.
This functionality is documented in the Binary Data section of the JDBC
driver chapter in the documentation.

thanks,
--Barry



Andreas Bauer wrote:
> Hi,
>
> know I've figured out that it had something to do with the
> driver version. But now I get the following message and it doesn't
> work either:
>
> INSERT INTO blob_test VALUES ('noname.bmp', 'BM\\302p\\000\\000\\000\\
> .......
> \\335\\316\\335\\316\\000\\000')
>
> The table looks like this:
> CREATE TABLE blobl_tbl (
>   name varchar(35),
>   bmp oid
> );
>
> Thanks in advance
>
> Andi
>




pgsql-jdbc by date:

Previous
From: "Lufkin, Brad"
Date:
Subject: COUNT
Next
From: Nicolas Modrzyk
Date:
Subject: Postgresql java and blobs