Re: Re: What needs to be done? - Mailing list pgsql-jdbc

From Anders Bengtsson
Subject Re: Re: What needs to be done?
Date
Msg-id Pine.LNX.4.33.0108022046010.1652-100000@sensenet.localdomain
Whole thread Raw
In response to Re: What needs to be done?  (Barry Lind <barry@xythos.com>)
List pgsql-jdbc
On Wed, 1 Aug 2001, Barry Lind wrote:

> Anders,
>
> What aspects of BLOB support do you consider broken?  Are these aspects
> that are broken in the JDBC layer or are 'broken' at the server layer?

Now I've looked at the code and located the problem:

The method setBinaryStream(...) in PreparedStatement always assumes that
it's a BLOB that we want to write, but it should really be able to write
any kind of field. It should for instance be possible to write a VARCHAR
from an InputStream, but currently you will end up with an integer (the
OID) in the field instead of the data.

I was first surprised to find that getBinaryStream(...) in ResultSet
*does* support both BLOBs and ordinary values, but then realized that it
can do this because it knows the type of the field. In PreparedStatement
nothing is known about the fields.

I'm not sure where this problem belongs. It is not impossible for the JDBC
driver to find out about the field types, but it may be slow to do so.

/Anders

_____________________________________________________________________
A n d e r s  B e n g t s s o n                   ndrsbngtssn@yahoo.se
Stockholm, Sweden


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


pgsql-jdbc by date:

Previous
From: Rene Pijlman
Date:
Subject: Re: Re: What needs to be done?
Next
From: Anders Bengtsson
Date:
Subject: Re: Re: What needs to be done?