
January 28th, 2013, 07:01 PM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 23
Time spent in forums: 6 h 17 m 50 sec
Reputation Power: 0
|
|
It looks like I can answer my own question. For those who are interested, it's looks like this (in Perl):
Code:
use DBI;
$dbh = DBI->connect("DBI:Pg:dbname=postgres;host=localhost;port=5432", "postgres", "postgres");
$sth = dbh->prepare("UPDATE table SET column = (?::bytea) WHERE key = ?");
$sth->bind_param(1, $bindata, { pg_type => DBD::Pg::PG_BYTEA});
$sth->bind_param(2, $key);
$sth->execute;
This is basic but it gets the idea across. Remember to check for errors!
|