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

Re: perl and large objects

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "pgsql-interfaces" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: perl and large objects
Date: 2005-05-18 23:07:27
Message-ID: 20050519010331.7693010@localhost (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
	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?

 PostgreSQL-powered mail user agent and storage:

In response to


pgsql-interfaces by date

Next:From: Sean DavisDate: 2005-05-19 10:05:36
Subject: Re: perl and large objects
Previous:From: Sean DavisDate: 2005-05-18 22:36:50
Subject: perl and large objects

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