[BUGS] no way in LargeObject API to detect short read? - Mailing list pgsql-jdbc

From pgsql-bugs@postgresql.org
Subject [BUGS] no way in LargeObject API to detect short read?
Date
Msg-id 200011140658.eAE6wuj89143@hub.org
Whole thread Raw
Responses Re: [BUGS] no way in LargeObject API to detect short read?  (Peter T Mount <peter@retep.org.uk>)
List pgsql-jdbc
Paul M. Aoki (aoki@acm.org) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
no way in LargeObject API to detect short read?

Long Description
org.postgresql.largeobject.LargeObject.read(byte[],int,int) returns void instead of int.  there's therefore no
reliable,non-exceptional way to detect short reads. 

the natural way to write blocked-read loops would be to assume that read(byte[],int,int) returned the number of bytes
reador (e.g.) -1 on EOF. 

Sample Code


No file was uploaded with this report



pgsql-jdbc by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: emails
Next
From: Gunnar R|nning
Date:
Subject: Re: [GENERAL] Re: JDBC Performance