To answer my own question, seems that specifying the host as follows:
---------------------------------------------------------------------
my $dbh=DBI->connect("dbi:Pg:dbname=$dbmain;host=localhost", $dbuser,
$dbpass, { RaiseError => 1, AutoCommit => 0});
--------------------------------------------------------------------------
does the job.
----- Original Message -----
From: "Howard Fuchs" <[EMAIL PROTECTED]>
Newsgroups: perl.dbi.users
To: <[EMAIL PROTECTED]>
Sent: Monday, September 23, 2002 4:13 PM
Subject: Problem connect to PG on W2K
> Hi
>
> I am trying to connect via DBI to a PostgreSQL server set up on a W2K
> machine.
>
> I get the following error:
> ---------------------------
> DBI->connect(dbname=test1) failed: connectDBStart() -- socket() failed:
> errno=2
> No such file or directory
> ------------------------------
> Postmaster is set up as a W2K service and I am able to connect to test1
> database via PSQL from C-prompt or CYGWIN.
> Here is code snippet:
> ---------------------------------------------
> my $dbh=DBI->connect("dbi:Pg:dbname=$dbmain", $dbuser, $dbpass, {
> RaiseError => 1, AutoCommit => 0});
> -----------------------------------------
> I set up DBD-Pg via PPM.
>
> Any ideas as to what I am missing.
>
> Howard
>