Wednesday, September 15, 2010

COPY support of PostgreSQL

For details refer to DBD::Pg document and

http://www.postgresql.org/docs/current/static/sql-copy.html


$dbh->do("COPY mytable FROM STDIN");
$dbh->pg_putline("123\tPepperoni\t3\n");
$dbh->pg_putline("314\tMushroom\t8\n");
$dbh->pg_putline("6\tAnchovies\t100\n");
$dbh->pg_endcopy;

No comments:

Post a Comment