Received: from cplane.com (IDENT:qmailr@jersey.cplane.com [63.193.105.226]) by hub.org (8.10.1/8.10.1) with SMTP id e72Jv8G67511 for ; Wed, 2 Aug 2000 15:57:08 -0400 (EDT) Received: (qmail 12551 invoked from network); 2 Aug 2000 18:38:00 -0000 Received: from unknown (HELO texas.cplane.com) (unknown) by unknown with SMTP; 2 Aug 2000 18:38:00 -0000 Received: (qmail 15997 invoked from network); 2 Aug 2000 19:56:59 -0000 Received: from unknown (HELO cplane.com) (unknown) by unknown with SMTP; 2 Aug 2000 19:56:59 -0000 Message-ID: <39887D0B.D9525DD1@cplane.com> Date: Wed, 02 Aug 2000 12:56:59 -0700 From: Bill X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Peter Mount CC: pgsql-interfaces@postgresql.org Subject: Re: JDBC driver writes binary data ONLY as Large Object References: <1B3D5E532D18D311861A00600865478CF1B1A2@exchange1.nt.maidstone.gov.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200008/25 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