小山浩之 > DBD-PgPP-0.04 > DBD::PgPP

Download:
DBD-PgPP-0.04.tar.gz

Dependencies

Annotate this POD (1)

Related Modules

DBD::Pg
Win32::ODBC
DBD::ODBC
IO::Socket
more...
By perlmonks.org

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.04   Source  

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.

LIMITATION ^

DEPENDENCIES ^

This module requires these other modules and libraries:

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

TODO ^

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.

syntax highlighting: