Re: Simple DBI question.

From: "Thomas A(dot) Lowery" <tl-lists(at)stlowery(dot)net>
To: pgsql general list <pgsql-general(at)postgresql(dot)org>
Subject: Re: Simple DBI question.
Date: 2003-08-15 01:38:00
Message-ID: 20030815013800.GB22410@stlowery.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 12, 2003 at 04:58:49PM -0400, David Siebert wrote:
> How do I connect to a postgres sever across a network using DBI?
> I can not find an example of it anywhere in any docs.

connect string like "dbi:Pg:dbname=db;host=machine;port=5432"
Example:

use DBI;

my $dbh = DBI->connect( "dbi:Pg:dbname=db;host=db_server;port=5432",
"test", "test", {RaiseError => 1} ) or die "Unable to connect: $DBI::errstr\n";
$dbh->disconnect;

> Thanks.
> Also what do I type after man to get the Pg dbi man file?

perldoc DBI
perldoc DBD:Pg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Bartlett 2003-08-15 02:06:48 Re: PostGreSQL - Accessing It
Previous Message Andrew L. Gould 2003-08-14 23:48:43 Re: Importing data