Re: InputStream as parameter not supported - Mailing list pgsql-jdbc

From Peter T Mount
Subject Re: InputStream as parameter not supported
Date
Msg-id 988038684.3ae4461ce1f4c@webmail.retep.org.uk
Whole thread Raw
In response to InputStream as parameter not supported  ("Steven Smith" <steven@geometryit.com>)
List pgsql-jdbc
Quoting Steven Smith <steven@geometryit.com>:

> I am using PostgreSQL 7.0, with the jdbc7.0-1.2.jar file.
> I am trying to send a Large Object to the database but get an error
> saying
> 'InputStream as parameter not supported'
> The offending statement is
> 'stmt.setBinaryStream(1, geomStream, geomStream.available());'
> where geomStream is an instanceof ByteArrayInputStream and stmt is a
> PreparedStatement.
> The exact same code runs beautifully under Oracle, but throws this
> exeption
> under PostgreSQL.
> I have followed the documentation to the letter so I don't see why it
> throws
> the exception.
> The field in the table is of type 'oid', which the documentation uses.

These methods are implemented in 7.1. Prior to 7.1, you have to use the
getBytes/getBytes methods or the large object api's.

Peter

--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

pgsql-jdbc by date:

Previous
From: Peter T Mount
Date:
Subject: Re: [GENERAL] 7.1 RPM has old JDBC driver - SQL statement too long
Next
From: Peter T Mount
Date:
Subject: Re: [GENERAL] 7.1 RPM has old JDBC driver - SQL statement too long