Large objects + JDBC - Mailing list pgsql-general

From Marcin Mazurek - Multinet SA - Poznan
Subject Large objects + JDBC
Date
Msg-id Pine.BSF.3.96.991212182541.20684A-100000@arka
Whole thread Raw
In response to c function return not recognized?  (Frank Miles <fpm@u.washington.edu>)
List pgsql-general
Hi,
I'm put several gifa into a table. I did as a exercise:) form psql using:
INSERT INTO images (id, data)
    VALUES (3, lo_import('/usr/local/apache/servlets/images/a.gif'));

but I have a problem with creating Java stream to read these data. Here
serveral lines of code I was using:
PreparedStatement ps=db.prepareStatement("select oid from imag where  id=?");
       ps.setInt(1,1);
       ResultSet rs = ps.executeQuery();
       rs.next();
       InputStream is = rs.getBinaryStream(0);
and nothing happens:( Several messages from exceptions:
[13/12/1999 18:11:04:815 CET] ShowImageServlet1: 0
null
Fastpath: ERROR:  lo_tell: large object descriptor (-1) out of range

Anybody know how to read LargeObjects with java?
btw I read about postgres JDBC extensions LargeObject and
LargeObjectManager and everthing would be great except nobody mentioned
that they are not completely implemented:)
Anybody can send me a small exapmle how to read these data?
mazek



pgsql-general by date:

Previous
From: "R.J."
Date:
Subject: Index of words form a field.
Next
From: The Hermit Hacker
Date:
Subject: radius.detaillog -> pgsql parser?