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