Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.


In response to

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group