Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id VAA97981 for ; Thu, 8 Jul 1999 21:17:00 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id VAA01302; Thu, 8 Jul 1999 21:16:14 -0400 (EDT) To: Florian Baumert cc: pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Postgresql + lo In-reply-to: Your message of Fri, 9 Jul 1999 00:19:51 +0200 <1913.990709@plt.de> Date: Thu, 08 Jul 1999 21:16:14 -0400 Message-ID: <1300.931482974@sss.pgh.pa.us> From: Tom Lane Florian Baumert writes: > What happens is that it writes a -1 to the screen and a database-error "ERROR: lo_lseek: invalid large obj descriptor (0)" This needs to go into the FAQ, I think, 'cause you're about the third person to ask the same question in the past couple weeks. You need to wrap a transaction ("begin" ... "commit") around any use of a large object handle, ie any lo_open ... lo_close sequence. This requirement has always been in the LO docs, but Postgres 6.5 is the first release that enforces the rule (by closing all open LO handles at end of statement, if not within a transaction). In prior versions, you could sometimes get away with not using a transaction, but it was NOT reliable. regards, tom lane