DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' ) fails silently - Mailing list pgsql-general

From Kynn Jones
Subject DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' ) fails silently
Date
Msg-id c2350ba40903180900n3743e5d9n63cfaaff484fe1d2@mail.gmail.com
Whole thread Raw
Responses Re: DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' ) fails silently  ("Will Rutherdale (rutherw)" <rutherw@cisco.com>)
Re: DBD::Pg`s $dbh->func( "/path/to/file", `lo_import` ) fails silently  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-general
I'm trying to use Perl's DBD::Pg module to import a file as a large object.  For this I'm using the following:

my $oid = $dbh->func( "/absolute/path/to/file", 'lo_import' );

When I do this, a new record is added to pg_largeobject, with a proper-looking non-null loid, but the data field remains empty, and the variable $oid above gets a return value of undef, i.e. the call to func fails. No error warning is ever emitted, as far as I can tell. ($dbh->errstr returns undef.) FWIW, the file passed as the first argument is world-readable, and the full path to it is world-accessible.

I've read the documentation for Perl's DBI and DBD::Pg modules, but I can't find any information that will enable me to troubleshoot/debug this further. Any suggestions would be greatly appreciated!

TIA!

Kynn


pgsql-general by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: sql transaction
Next
From: Gurjeet Singh
Date:
Subject: Re: schema, view and role