Large objects + JDBC
От
Marcin Mazurek - Multinet SA - Poznan
Тема
Large objects + JDBC
Дата
Msg-id
Pine.BSF.3.96.991212182541.20684A-100000@arka
Ответ на
c function return not recognized? (Frank Miles)
Список
Дерево обсуждения
c function return not recognized? Frank Miles <fpm@u.washington.edu>
Re: [GENERAL] c function return not recognized? "Gene Selkov Jr." <selkovjr@selkovjr.xnet.com>
Large objects + JDBC Marcin Mazurek - Multinet SA - Poznan <m.mazurek@multinet.pl>
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 по дате отправления