Handling of large objects in DBD::Pg?

From: "M(dot) Tavasti" <tawz(at)nic(dot)fi>
To: pgsql-general(at)postgresql(dot)org
Subject: Handling of large objects in DBD::Pg?
Date: 2001-02-19 12:58:42
Message-ID: m2lmr296d9.fsf@akvavitix.vuovasti.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

Browse pgsql-general by date

  From Date Subject
Next Message Mitch Vincent 2001-02-19 14:27:40 Fw: PHP and pg_connect()
Previous Message Atul 2001-02-19 11:07:57 Query