From: | Ole Streicher <ole-usenet-spam(at)gmx(dot)net> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Another LargeObject problem |
Date: | 2003-07-25 11:25:59 |
Message-ID: | qfoezix2yg.fsf@ebp00439.ebp.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hi,
I have another Problem when using LargeObjects.
>From time to time, I get the exception
FastPath call returned ERROR: lo_lseek: invalid large obj descriptor (369)
What does this exception mean? It occurs randomly; a repeated
retrieval works usually.
The code I use here is appended below.
BTW, yesterday I posted another question, but that has not arrived at
the mailing list (even the retry after I subscribed). Is there any
problem with the list or does it just take some days to appear there?
Ciao
Ole
-----------------------------8<------------------------------------------
PreparedStatement queryStmt
= dbConn.prepareStatement("SELECT Values, From_Date, To_Date FROM "
+ tableName
+" WHERE From_Date <= ? AND To_Date > ?");
queryStmt.setTimestamp(1, from);
queryStmt.setTimestamp(2, to);
ResultSet rs = queryStmt.executeQuery();
while (rs.next()) {
Timestamp f = rs.getTimestamp(2);
Timestamp t = rs.getTimestamp(3);
int oid = rs.getInt(1);
LargeObject obj = lobj.open(oid, LargeObjectManager.READ);
byte[] b = new byte[obj.size()]; // *** Here it happens ****
obj.read(b, 0, b.length);
// ...
}
From | Date | Subject | |
---|---|---|---|
Next Message | Ole Streicher | 2003-07-25 11:45:40 | Problem with LargeObject/jdbc when writing short (Repost) |
Previous Message | Paul Thomas | 2003-07-25 08:06:58 | Re: quick question about PreparedStatements |