From: win harrington <[EMAIL PROTECTED]>

We bought your excellent book on Perl DBI. Do you have
an example of connecting to Postgres with DBI?

To learn about particular datbase systems supported by DBI, look at the documentation for the DBD (driver) for that system. In this case it would be DBD::Pg, for example:

http://search.cpan.org/author/DWHEELER/DBD-Pg-1.22/dbd-pg.pod#Connect_Syntax

This connection works for me:

   my $dbh = DBI->connect(
       'dbi:Pg:host=localhost'
       undef,
       undef,
      {RaiseError=>1}
   ) or die DBI::errstr;

--
Jeff



Reply via email to