Skip site navigation (1) Skip section navigation (2)

lo_import problems

From: Igor Gavriloff <igor(at)nupes(dot)cefetpr(dot)br>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: lo_import problems
Date: 2000-04-18 22:33:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

    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

$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!


pgsql-interfaces by date

Next:From: Joe ShevlandDate: 2000-04-19 01:11:18
Subject: Re: psql & java
Previous:From: David ConnersDate: 2000-04-18 19:08:31
Subject: Re: Using PGSQL via ODBC from within StarOffice ...

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group