Problem with Large Objects

From: Dorin Grunberg <dorin(at)visgen(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Problem with Large Objects
Date: 1999-11-12 20:33:21
Message-ID: 4.2.0.58.19991112141528.00a56e60@pophost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I am trying to recreate the example from the Postgresql manual using Perl
and DBI.

I was able to insert the image 'inside' the table. I checked the /tmp
directory to see if it is there.

When I run the following lines I get the output an "1"

my $sth = $dbh->prepare_cached(qq{SELECT lo_export(image.file,
'/tmp/Patti.jpg') from image WHERE name='picture'}) || die "Can't prepare
statement: $DBI::errstr";

my $rc = $sth->execute || die "Can't execute statement:
$DBI::errstr";

while (($picture) = $sth->fetchrow_array() ) {

print $picture;

}

What am I doing wrong here?

Browse pgsql-interfaces by date

  From Date Subject
Next Message The Hermit Hacker 1999-11-13 02:04:12 Re: [INTERFACES] THE Postgres WEB SITE
Previous Message Oliver Elphick 1999-11-12 19:56:53 Re: [INTERFACES] RE: THE Postgres WEB SITE