From: Igor Gavriloff <igor@nupes.cefetpr.br>
To: pgsql-interfaces@postgresql.org
Subject: lo_import problems
Date: Tue, 18 Apr 2000 19:33:40 -0300
Message-ID: <38FCE2C3.A613E24D@nupes.cefetpr.br> (raw)
Hi,
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);
...
Where $file is the file to be imported into the database. If I try to do as in Chapter 45:
INSERT INTO image (name, raster) VALUES ('beautiful image', lo_import('/etc/motd'));
I get the following error:
ERROR: You must have Postgres superuser privilege to use server-side lo_import().
Anyone can use the client-side lo_import() provided by libpq.
And, indeed, this only works when logged on as superuser on the database, but not with the others.
Thanks in advance.
--
Is your job running? You'd better go catch it!
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: igor@nupes.cefetpr.br
Subject: Re: lo_import problems
In-Reply-To: <38FCE2C3.A613E24D@nupes.cefetpr.br>
* 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