pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Verite <daniel@manitou-mail.org>
To: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: perl and large objects
Date: Thu, 19 May 2005 01:07:27 +0200
Message-ID: <20050519010331.7693010@localhost> (raw)
In-Reply-To: <9ba996673af22c512313dc025914263a@mail.nih.gov>

	Sean Davis wrote:

> I am new to large objects and have a simple test script that dies (at 
> the lo_import line) and I don't know why (no descriptive error given).  
> Any suggestions (or a quick tutorial)?  The DBD manual just wasn't 
> quite enough for me, I guess.

The lack of error message feels like what happens when you call lo_*
functions outside of a transaction. IIRC you just get 0 as the resulting
oid to a lo_import, for instance.

You could try adding $dbh->do("select 1") just after $dbh->{AutoCommit}=0
to ensure that a transaction is started before the lo_import.

Also, your code snippet runs fine for me, unmodified, with DBD::Pg 1.21
Are you running an older version?

-- 
 Daniel
 PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org



view thread (4+ messages)  latest in thread

Message-ID: <20050519010331.7693010@localhost>
Permalink:  ../20050519010331.7693010@localhost/
Also on:    postgresql.org/message-id/20050519010331.7693010@localhost

 · 

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: daniel@manitou-mail.org
  Subject: Re: perl and large objects
  In-Reply-To: <20050519010331.7693010@localhost>

* 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