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