From: Bill <bouma@cplane.com>
To: Peter Mount <petermount@it.maidstone.gov.uk>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: JDBC driver writes binary data ONLY as Large Object
Date: Wed, 02 Aug 2000 12:56:59 -0700
Message-ID: <39887D0B.D9525DD1@cplane.com> (raw)
References: <1B3D5E532D18D311861A00600865478CF1B1A2@exchange1.nt.maidstone.gov.uk>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: bouma@cplane.com, petermount@it.maidstone.gov.uk
Subject: Re: JDBC driver writes binary data ONLY as Large Object
In-Reply-To: <39887D0B.D9525DD1@cplane.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox