How do I handle large objects in DBD:Pg (perl DBI interface to
postgresql)?
I've tried to do like this, but not successfull, it looks like there
is no data inserted. I tried to see in psql is there something, doing
SELECT lo_export(data,"/tmp/foofaa.txt") from foofaa where id=XXXX;
$obj_ins = $dbh->prepare(q{
INSERT INTO foofaa
(id,entry,data)
VALUES
(?,?,?)});
$obj = $dbh->func("./$dir/obj.txt", 'lo_import');
$obj_ins->execute($id,$ent,$obj);
Manual page of DBD:Pg if confusing for lo_export:
$ret = $dbh->func($lobjId, 'lo_export');
Exports a large object into a Unix file. Returns
false upon failure, true otherwise.
To what file....
Any help welcome.
--
M. Tavasti