Hi guys,

I have a problem with DBD-Pg when try to talk to Postgresql. I always get
this error :

Undefined subroutine &Pg::connectdb called at test.pl line 4.

Below is my code ?

1.#!/usr/bin/perl -w
2.
3.use Pg;
4.    $conn = Pg::connectdb("dbname=template1");
5.    $res  = $conn->exec("SELECT * from pg_user");
6.    while (@row = $res->fetchrow) {
7.        print = join(" ", @row);
8.    }

I tried to uninstall and reinstall with any older version and latest version
of DBD-Pg, but nothing help. Which version should I install?

For those who has these experience before, please advise.

Regards,
Han Lin

Reply via email to