pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Igor Gavriloff <igor@nupes.cefetpr.br>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: lo_import problems
Date: Wed, 19 Apr 2000 00:21:05 -0400
Message-ID: <21979.956118065@sss.pgh.pa.us> (raw)
In-Reply-To: <38FCE2C3.A613E24D@nupes.cefetpr.br>
References: <38FCE2C3.A613E24D@nupes.cefetpr.br>

Igor Gavriloff <igor@nupes.cefetpr.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



view thread (3+ messages)  latest in thread

Message-ID: <21979.956118065@sss.pgh.pa.us>
Permalink:  ../21979.956118065@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21979.956118065@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, igor@nupes.cefetpr.br
  Subject: Re: lo_import problems
  In-Reply-To: <21979.956118065@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox