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.
Thanks,
Sean
#!/usr/bin/perl
use strict;
use DBI;
my $dbh = DBI->connect('dbi:Pg:dbname=test2', undef, undef, {AutoCommit=>1},) || die $@;
$dbh->{AutoCommit}=0;
my $lobjID = $dbh->func("./out.png",'lo_import') || die $DBI::errstr;
print $lobjID . "\n";
my $sth=$dbh->prepare('insert into lo_store (obj) values (?)');
$sth->execute($lobjID);
$dbh->commit();
$dbh->func($lobjID,"./lo.pl.copy",'lo_export') || die $@;
$dbh->commit();