1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-21 16:02:15 +03:00

Tue Jan 30 22:24:00 GMT 2001 peter@retep.org.uk

- Fixed bug where Statement.setMaxRows() was a global setting. Now
          limited to just itself.
        - Changed LargeObject.read(byte[],int,int) to return the actual number
          of bytes read (used to be void).
        - LargeObject now supports InputStream's!
        - PreparedStatement.setBinaryStream() now works!
        - ResultSet.getBinaryStream() now returns an InputStream that doesn't
          copy the blob into memory first!
        - Connection.isClosed() now tests to see if the connection is still alive
          rather than if it thinks it's alive.
This commit is contained in:
Peter Mount
2001-01-31 08:26:02 +00:00
parent dca0762efc
commit 8439a83d84
12 changed files with 442 additions and 97 deletions

View File

@ -581,6 +581,15 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
*/
public InputStream getBinaryStream(int columnIndex) throws SQLException
{
// New in 7.1 Handle OID's as BLOBS so return the input stream
if(!wasNullFlag)
if( fields[columnIndex - 1].getOID() == 26) {
LargeObjectManager lom = connection.getLargeObjectAPI();
LargeObject lob = lom.open(getInt(columnIndex));
return lob.getInputStream();
}
// Not an OID so fake the stream
byte b[] = getBytes(columnIndex);
if (b != null)