Thread
-
no way in LargeObject API to detect short read?
PostgreSQL Bugs List <pgsql-bugs@postgresql.org> — 2000-11-14T06:58:56Z
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 read or (e.g.) -1 on EOF. Sample Code No file was uploaded with this report
-
Re: no way in LargeObject API to detect short read?
Bruce Momjian <pgman@candle.pha.pa.us> — 2001-01-24T14:22:53Z
Anyone able to fix this? > 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 read or > (e.g.) -1 on EOF. > > Sample Code > > > No file was uploaded with this report > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
-
Re: [JDBC] no way in LargeObject API to detect short read?
Peter Mount <peter@retep.org.uk> — 2001-01-25T17:30:12Z
Quoting pgsql-bugs@postgresql.org: > 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? Will check to see how libpq (which this API is based on) handles this. I've got on my list of Saturday items the stream support, which will need this. Peter > > 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 read or (e.g.) -1 on > EOF. > > Sample Code > > > No file was uploaded with this report > > > -- 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/
-
Re: [JDBC] no way in LargeObject API to detect short read?
Peter Mount <peter@retep.org.uk> — 2001-01-30T23:31:53Z
At 01:58 14/11/00 -0500, pgsql-bugs@postgresql.org wrote: >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 read or (e.g.) -1 on EOF. > >Sample Code > > >No file was uploaded with this report This method now returns the number of bytes read. It will be in CVS by 0900GMT tomorrow. Peter
-
Re: no way in LargeObject API to detect short read?
Bruce Momjian <pgman@candle.pha.pa.us> — 2001-02-07T03:42:46Z
This is fixed in the current 7.1 snapshot. > 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 read or (e.g.) -1 on EOF. > > Sample Code > > > No file was uploaded with this report > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026