Received: from talshiar.kja-essen.de (root@[193.158.244.43]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA57779 for ; Sat, 2 Oct 1999 11:38:19 -0400 (EDT) (envelope-from wn@kja-essen.de) Received: from kja-essen.de (dialin.kja-essen.de [193.158.244.35]) by talshiar.kja-essen.de (8.9.3/8.9.3/Debian/GNU/woho) with ESMTP id QAA09553; Wed, 25 Aug 1999 16:15:54 +0200 Sender: wn@kja-essen.de Message-ID: <37F62682.D3A869EA@kja-essen.de> Date: Sat, 02 Oct 1999 17:36:34 +0200 From: Wolfgang Hottgenroth Reply-To: woho@ieee.org X-Mailer: Mozilla 4.5 [en] (X11; I; Linux 2.2.12 i486) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane CC: woho@ieee.org, pgsql-interfaces@hub.org Subject: Re: [INTERFACES] problems with large-objects References: <1665.938878406@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Tom, thank you for that fast answer. So I failed when reading the manual, because I never realized, that using transactions are a requirement when working with LO's. Wolfgang Tom Lane wrote: > > Wolfgang Hottgenroth writes: > > Sometimes ago I want to switch from 6.4.2 to 6.5.1 and my tools, using > > the large objects through the perl-library refused to work. lo_import > > didn't work anymore. > > 6.5.* only allows large objects to be kept open within a single > transaction; you have to wrap BEGIN...END around anything that involves > lo_open ... lo_read/write ... lo_close. In particular, since lo_import > and lo_export are just such sequences, they need to be called inside > a transaction. > > This restriction has been documented as required all along, but older > Postgres releases didn't enforce it (they'd just fail once in a while > if you didn't do it :-(). > > It'd be nice if lo_import could start/finish a transaction for itself, > but I don't see any good way to do that without breaking things for > the case that you want to do several lo_imports in one transaction. > > regards, tom lane