Re: standard LOB support

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Thomas Kellerer *EXTERN*" <spam_eater(at)gmx(dot)net>, <ebihara(at)iplocks(dot)co(dot)jp>
Cc: <pgsql-general(at)postgresql(dot)org>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: standard LOB support
Date: 2007-06-22 08:22:53
Message-ID: AFCCBB403D7E7A4581E48F20AF3E5DB2037D9F1A@EXADV1.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-jdbc

Thomas Kellerer wrote:
> Hmm. At least for updating LOBs, "my method" should be "legal".
> This is a quote from jdbc-3_0-fr-spec.pdf
>
> "The setBinaryStream and setObject methods may also be used to set a
Blob
> object as a parameter in a PreparedStatement object. The
setAsciiStream,
> setCharacterStream, and setObject methods are alternate means of
setting a
> Clob object as a parameter."
>
> But I have to admit that I never read the specs in detail until now.
Those
> methods were simply working fine (and were the only reliable way to
handle LOBs
> with the Oracle drivers).

Yuichiro, I'd use these methods for BLOBs if they work on all
the DBMS Thomas mentioned.

> But I do think that the exception thrown when using getClob() or
getBlob() is an
> error in the JDBC driver. Maybe we should file an issue for this.

I'm certainly not a core developer of the JDBC provider, but working
with it and reading the code it seems quite clear to me that the driver
treats PostgreSQL large objects as java.sql.BLOBs and byteas as
java.sql.Types.BINARY, and that this is intentional.

I don't think it would be a simple change to allow byteas to be treated
as BLOBs.

I have CC'ed the JDBC mailing list as I think this should go there
(too).

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Goodenough 2007-06-22 08:42:18 Regular express question
Previous Message EBIHARA, Yuichiro 2007-06-22 08:20:54 Re: standard LOB support

Browse pgsql-jdbc by date

  From Date Subject
Next Message Mario Splivalo 2007-06-22 13:21:34 Re: Log files cluttered with jdbc3/4 for pg8.2
Previous Message EBIHARA, Yuichiro 2007-06-22 08:20:54 Re: standard LOB support