NAME

DBD::PgPP - Pure Perl PostgreSQL driver for the DBI

SYNOPSIS

use DBI;

my $dbh = DBI->connect('dbi:PgPP:dbname=$dbname', '', ''');

# See the DBI module documentation for full details

DESCRIPTION

DBD::PgPP is a Pure Perl client interface for the PostgreSQL database. This module implements network protocol between server and client of PostgreSQL, thus you don't need external PostgreSQL client library like libpq for this module to work. It means this module enables you to connect to PostgreSQL server from some operation systems which PostgreSQL is not ported. How nifty!

MODULE DOCUMENTATION

This documentation describes driver specific behavior and restrictions. It is not supposed to be used as the only refference of the user. In any case consult the DBI documentation first !

THE DBI CLASS

DBI Class Methods

connect

To connecto to a database with a minimum of parameters, use the following syntax: $dbh = DBI->connect('dbi:PgPP:dbname=$dbname', '', '');

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.

SUPPORT OPERATING SYSTEM

This module has been tested on these OSes.

  • Mac OS 9

    with MacPerl5.6.1r1 built for PowerPC

  • Mac OS X

    with perl v5.6.0 built for darwin

  • Windows2000

    with ActivePerl5.6.1 build631.

  • FreeBSD 4.6

    with perl v5.6.1 built for i386-freebsd

  • FreeBSD 3.4

    with perl v5.6.1 built for i386-freebsd

    with perl v5.005_03 built for i386-freebsd

  • Linux

    with perl v5.005_03 built for ppc-linux

  • Solaris 2.6 (SPARC)

    with perl5.6.1 built for sun4-solaris.

    with perl5.004_04 built for sun4-solaris.

    Can use on Solaris2.6 with perl5.004_04, although make test is failure.

LIMITATION

  • Can't use 'crypt' authentication in a part of FreeBSD.

  • Can't use the 'Kerberos v4/5' authentication.

  • Can't use the SSL Connection.

  • Can't use BLOB data.

DEPENDENCIES

This module requires these other modules and libraries:

L<DBI>, L<IO::Socket>

TODO

  • Add the original crypt (pure perl) method.

SEE ALSO

DBI, http://developer.postgresql.org/docs/postgres/protocol.html

AUTHOR

Hiroyuki OYAMA <oyama@crayfish.co.jp>

COPYRIGHT AND LICENCE

Copyright (C) 2002 Hiroyuki OYAMA. Japan. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.