Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id AAA82019 for ; Wed, 19 Apr 2000 00:21:09 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id AAA21982; Wed, 19 Apr 2000 00:21:05 -0400 (EDT) To: Igor Gavriloff cc: pgsql-interfaces@postgreSQL.org Subject: Re: lo_import problems In-reply-to: <38FCE2C3.A613E24D@nupes.cefetpr.br> References: <38FCE2C3.A613E24D@nupes.cefetpr.br> Comments: In-reply-to Igor Gavriloff message dated "Tue, 18 Apr 2000 19:33:40 -0300" Date: Wed, 19 Apr 2000 00:21:05 -0400 Message-ID: <21979.956118065@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200004/136 Igor Gavriloff writes: > I'm trying to write an script in Perl5 that do an lo_import, but > using the one that the perl interface offers returns an oid equal to > zero: > ... > $conn = Pg::connectdb("dbname=test"); > $lobjId = $conn->lo_import($file); lo_import, like all LO operations, has to be executed inside a transaction block (BEGIN/END SQL commands). This is, um, poorly documented in the Perl interface's docs, though you can read about it in the docs for the underlying C library libpq. regards, tom lane