You need to provide the host of the local machine in your connect
parameters (e.g. 127.0.0.1 or localhost). The /tmp directory reference
indicates that perl is trying to connect with a Unix domain socket
which is not supported on Windows. TCP/IP host connections only.
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
On Mar 29, 2005, at 8:12 PM, Stephen Choularton wrote:
> # connecting to database
>
> my $database='mydb';
>
> my $username = 'postgres';
>
> my $password = '';
>
> my $dbh = DBI->connect("DBI:PgPP:$database",
>
> "$username", "$password");
>
>
>
> I get:
>
>
>
> C:\DB>db.pl
>
> DBI connect('mydb','postgres',...) failed: Couldn't connect to
> /tmp/.s.PGSQL.543
>
> 2: at C:/Perl/site/lib/DBD/PgPP.pm line 124
>
> at C:\DB\db.pl line 15