Re: setBlob/getBlob, slony and bytea

From: Kris Jurka <books(at)ejurka(dot)com>
To: Tore Halset <halset(at)pvv(dot)ntnu(dot)no>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: setBlob/getBlob, slony and bytea
Date: 2006-12-01 14:04:30
Message-ID: Pine.BSO.4.64.0612010858570.22186@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Fri, 1 Dec 2006, Tore Halset wrote:

> After the switch to bytea setBlob and getBlob are not working anymore. Can
> this be fixed in the driver or do I need to detect if the blob in the
> database are oid or bytea before deciding if I should use setBlob or
> setBytes?
>

The driver could provide a wrapper that work for getBytes, but setBytes is
trickier because the driver doesn't know what data type the value will be
assigned to, it just fires away the data and hopes for the best.

This was previously discussed in this thread:

http://archives.postgresql.org/pgsql-jdbc/2005-01/thrd2.php#00029

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2006-12-01 14:07:55 Re: PreparedStatement and TYPE bit
Previous Message Kris Jurka 2006-12-01 13:58:06 Re: Locking on PGStream.ReceiveChar(PGStream.java:256)