Re: lo_import problems

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Igor Gavriloff <igor(at)nupes(dot)cefetpr(dot)br>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: lo_import problems
Date: 2000-04-19 04:21:05
Message-ID: 21979.956118065@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Igor Gavriloff <igor(at)nupes(dot)cefetpr(dot)br> 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Matthew Denny 2000-04-19 05:51:25 getting OID of INSERTed record in ECPG
Previous Message Alex Pilosov 2000-04-19 04:08:04 Re: Connecting website with SQL-database.....