Re: JDBC driver writes binary data ONLY as Large Object

From: Bill <bouma(at)cplane(dot)com>
To: Peter Mount <petermount(at)it(dot)maidstone(dot)gov(dot)uk>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: JDBC driver writes binary data ONLY as Large Object
Date: 2000-08-02 19:56:59
Message-ID: 39887D0B.D9525DD1@cplane.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Chris Ryan 2000-08-02 21:03:26 PgSql ODBC + Coldfusion + Solaris
Previous Message Joel Burton 2000-08-02 18:17:37 Re: ODBC, Access and updates/deletes alter 0 rows!