my $dbh = DBI->connect('dbi:PgPP:dbname=$dbname', '', ''');
# See the DBI module documentation for full details
This connects to the database $dbname at localhost without any user authentication. This is sufficient for the defaults of PostgreSQL.
The following connect statement shows all possible parameters:
$dbh = DBI->connect( "dbi:PgPP:dbname=$dbname", $username, $password );
$dbh = DBI->connect( "dbi:PgPP:dbname=$dbname;host=$host;port=$port", $username, $password );
$dbh = DBI->connect( "dbi:PgPP:dbname=$dbname;path=$path;port=$port", $username, $password );
parameter | hard coded default ----------+------------------- dbname | current userid host | localhost port | 5432 path | /tmp debug | undef
If a host is specified, the postmaster on this host needs to be started with the "-i" option (TCP/IP socket).
For authentication with username and password appropriate entries have to be made in pg_hba.conf. Please refer to the pg_hba.conf and the pg_passwd for the different types of authentication.
with perl v5.005_03 built for i386-freebsd
with perl5.004_04 built for sun4-solaris.
Can use on Solaris2.6 with perl5.004_04, although make test is failure.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.