Hi all
How I can make connection between PG and Perl5 DBI?

I install DBI, Install Pg.pm and postgres Pg.pm demo works, but any DBI
app - NOT. The DBI app say:
-----------------------------------------------------------------------
I made simple pl file:
----------------------
#!/usr/bin/perl

use DBI;

$db = "DBI:Pg:sims";
$user = "nobody";
$pw = "";
$res = DBI->connect($db, $user, $pw) || die "Aaaahhhh!!!";
print "is OK\n";
------------------------
After run it say:
-----------------
install_driver(Pg) failed: Can't locate DBD/Pg.pm in @INC (@INC contains:
/usr/lib/perl5/i586-linux/5.00404 /usr/lib/perl5
/usr/lib/perl5/site_perl/i586-linux /usr/lib/perl5/site_perl .) at (eval 1)
line 2.
Perhaps the DBD::Pg perl module hasn't been installed,
or perhaps the capitalisation of 'Pg' isn't right.
Available drivers: ExampleP, Proxy.
======================================
Ok, lets copy the Pg.pm into dir:
/usr/lib/perl5/site_perl/DBD
and run again
====================================
DBD::Pg initialisation failed: Can't locate object method "driver" via
package "DBD::Pg" at /usr/lib/perl5/site_perl/DBI.pm line 452.

Perhaps the capitalisation of DBD 'Pg' isn't right. at /root/con.pl line 8
=====================


Any ideas?
does i need different perl "db drivers", or i need to configure Perl
somewhere???

In addition i want to show this too:
----------
photon:/usr/local/pgsql/src/interfaces/perl5# make test
PERL_DL_NONLAZY=1
/usr/local/bin/perl -I./blib/arch -I./blib/lib -I/usr/lib/perl5/i586-linux/5
.00404 -I/usr/lib/perl5 test.pl
Pg::conndefaults ........ ok
Pg::connectdb ........... ok
$conn->exec ............. ok
$conn->errorMessage ..... ok
$conn->db ............... ok
$conn->user ............. ok
$conn->port ............. ok
$conn->cmdStatus ........ ok
$conn->oidStatus ........ ok
$conn->getline .......... ok
$conn->endcopy .......... ok
$result->cmdTuples ...... ok
$result->fname .......... ok
$result->ftype .......... ok
$result->fsize .......... ok
$result->fnumber ........ ok
$result->fetchrow ....... ok
test sequence finished.
-----------------

PLEESEEE HELP IT IS URGENT!!!!
(because i want to work with Linux/PG, not with NT/MSAccess or some
alike....

        Niki

Reply via email to