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

From: "Will Rutherdale (rutherw)" <rutherw(at)cisco(dot)com>
To: "Kynn Jones" <kynnjo(at)gmail(dot)com>, "pgsql-general General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' ) fails silently
Date: 2009-03-18 17:16:46
Message-ID: 50A8E1F8D9122546A7F67134915EDB7A3B8E30@xmb-rtp-21a.amer.cisco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I would suggest you join the Perl DBI mailing list and ask your question
there. There are some quite capable people in that group who could help
you troubleshoot this issue.

It's called dbi-users(at)perl(dot)org(dot) Look at
http://lists.cpan.org/showlist.cgi?name=dbi-users, where it tells you
how to subscribe.

-Will

________________________________

From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Kynn Jones
Sent: 18 March 2009 12:01
To: pgsql-general General
Subject: [GENERAL] DBD::Pg's $dbh->func( "/path/to/file", 'lo_import' )
fails silently

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pedro Doria Meunier 2009-03-18 17:17:18 Re: Accent insensitive search?
Previous Message Sam Mason 2009-03-18 17:15:46 Re: Accent insensitive search?