Re: [GENERAL] standard LOB support

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: [GENERAL] standard LOB support
Дата
Msg-id AFCCBB403D7E7A4581E48F20AF3E5DB2037D9F1A@EXADV1.host.magwien.gv.at
обсуждение исходный текст
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Boom Roos"
Дата:
Сообщение: Bug report and patch: PreparedStatement.setObject(int, Object) does not infer java.lang.Byte
Следующее
От: Mario Splivalo
Дата:
Сообщение: Re: Log files cluttered with jdbc3/4 for pg8.2