Re: JDBC driver writes binary data ONLY as Large Object - Mailing list pgsql-interfaces

From Bill
Subject Re: JDBC driver writes binary data ONLY as Large Object
Date
Msg-id 39887D0B.D9525DD1@cplane.com
Whole thread Raw
In response to RE: JDBC driver writes binary data ONLY as Large Obj ect  (Peter Mount <petermount@it.maidstone.gov.uk>)
List pgsql-interfaces
Peter Mount wrote:

> The problem here is that there is no metadata available to check.
>
> If the backend was able to precompile the query, then we would know the
> column type, but as it stands currently there is no way of finding out what
> the column type is.
>
> Peter

Ok.  Suppose there was metadata available.  How would you
rewrite the function PreparedStatement.writeBytes() such that
it writes the bytes directly into the column?  Since that class
does everything through heavy use of String manipulation, I
can't see how to do it.  Is there a way?  I tried this:
 public void setBytes(int parameterIndex, byte x[]) throws SQLException {     set(parameterIndex, new String(x)); }

It barfed.

Bill





pgsql-interfaces by date:

Previous
From: "Joel Burton"
Date:
Subject: Re: ODBC, Access and updates/deletes alter 0 rows!
Next
From: Chris Ryan
Date:
Subject: PgSql ODBC + Coldfusion + Solaris