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 LAA57261 for ; Sat, 2 Oct 1999 11:34:01 -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 LAA01667; Sat, 2 Oct 1999 11:33:26 -0400 (EDT) To: woho@ieee.org cc: pgsql-interfaces@hub.org Subject: Re: [INTERFACES] problems with large-objects In-reply-to: Your message of Sat, 02 Oct 1999 09:48:45 +0200 <37F5B8DD.68DB625F@kja-essen.de> Date: Sat, 02 Oct 1999 11:33:26 -0400 Message-ID: <1665.938878406@sss.pgh.pa.us> From: Tom Lane 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