perl and large objects
| От | Sean Davis |
|---|---|
| Тема | perl and large objects |
| Дата | |
| Msg-id | 9ba996673af22c512313dc025914263a@mail.nih.gov обсуждение |
| Ответы |
Re: perl and large objects
|
| Список | pgsql-interfaces |
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();
В списке pgsql-interfaces по дате отправления: