Thread: Can't connect to postgresql on win32 using Perl
at x.pl line 5equested protocol was used.
could not create socket: An address incompatible with the requested protocol was
at x.pl line 5.
c:/perl58/site/lib/DBD/PgPP.pm line 124
at x.pl line 5
I don’t know a lot myself, but postmaster should be running, and you may need to play with:
postgres.conf
pg_hba.conf
pg_ident.conf
Sincerely,
r.
-----Original Message-----
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Ronald Schmidt
Sent: Sunday, February 02, 2003 4:51 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] Can't connect to postgresql on win32 using Perl
I am new to PostgreSQL but have gotten to the point where I have postmaster running as a service on Windows 2000 and can connect to the server by typing 'psql mydb'. I cannot however get a Perl/DBI connection to my database. I have tried both DBD::Pg with ActiveState Perl 5.6.1 and DBD::PgPP with ActiveState Perl 5.8.0. I installed PostgreSQL 7.3.1 with cygwin. The error messages I get with each type of connection are listed below:
(Perl 5.6.1 and DBD::Pg)
DBI->connect(dbname=mydb) failed: could not create socket: An address incompat
at x.pl line 5equested protocol was used.
could not create socket: An address incompatible with the requested protocol was
at x.pl line 5.
(Perl 5.8.0 and DBD::PgPP)
DBI->connect(dbname=mydb) failed: Couldn't connect to /tmp/.s.PGSQL.5432: at
c:/perl58/site/lib/DBD/PgPP.pm line 124
at x.pl line 5
I am really more interested in getting the connection to work with Perl 5.6.1 but have verified that /tmp/.s.PGSQL5432 exists and seems to have the right permissions.
Ronald Schmidt
----- Original Message -----From: Reshat SabiqSent: Sunday, February 02, 2003 6:51 PMSubject: Re: [NOVICE] Can't connect to postgresql on win32 using PerlI dont know a lot myself, but postmaster should be running, and you may need to play with:
postgres.conf
pg_hba.conf
pg_ident.conf
Sincerely,
r.-----Original Message-----
From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Ronald Schmidt
Sent: Sunday, February 02, 2003 4:51 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] Can't connect to postgresql on win32 using Perl
I am new to PostgreSQL but have gotten to the point where I have postmaster running as a service on Windows 2000 and can connect to the server by typing 'psql mydb'. I cannot however get a Perl/DBI connection to my database. I have tried both DBD::Pg with ActiveState Perl 5.6.1 and DBD::PgPP with ActiveState Perl 5.8.0. I installed PostgreSQL 7.3.1 with cygwin. The error messages I get with each type of connection are listed below:
(Perl 5.6.1 and DBD::Pg)
DBI->connect(dbname=mydb) failed: could not create socket: An address incompat
at x.pl line 5equested protocol was used.
could not create socket: An address incompatible with the requested protocol was
at x.pl line 5.
(Perl 5.8.0 and DBD::PgPP)
DBI->connect(dbname=mydb) failed: Couldn't connect to /tmp/.s.PGSQL.5432: at
c:/perl58/site/lib/DBD/PgPP.pm line 124
at x.pl line 5I am really more interested in getting the connection to work with Perl 5.6.1 but have verified that /tmp/.s.PGSQL5432 exists and seems to have the right permissions.
Ronald Schmidt
On Tue, 2003-02-04 at 03:24, Ronald Schmidt wrote: > As my original email stated, I have postmaster running as a service. > I have looked at all three of the files you mentioned and do not > understand why their default configurations would interfere with > connections from Perl DBI/DBD. pg_hba.conf defines the limitations to access and authenticate with the database - that's the most likely of the three to need editing in your case. I've never used the Windows version so I don't know if it supports local socket access, but for TCP access you need to ensure you are running PostgreSQL with the -i switch. Is there a Windows equivalent to "netstat"? You might check to see whether the DB is listening. Cheers, Andrew. -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ ---------------------------------------------------------------------
Hi... Does anyone know the command to find the current version # of Postgres?? Thanks
Does anyone know the command to find the current version # of Postgres?? ------- postgres -V Sincerely, r.
On Tue, 2003-02-04 at 14:08, Jonathon Batson wrote: > Hi... > > Does anyone know the command to find the current version # of Postgres?? andrew@kant ~ $ psql template1 Welcome to psql 7.3.1, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit template1=# select version(); version ----------------------------------------------------------------------------------------------------- PostgreSQL 7.3.1 on i386-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030109 (Debian prerelease) (1 row) template1=# Regards, Andrew. -- --------------------------------------------------------------------- Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 Survey for nothing with http://survey.net.nz/ ---------------------------------------------------------------------
I found the solution on Google groups: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=000c01c2 6356%24d9ad5d70%240100a8c0%40uz2.ca&rnum=19&prev=/groups%3Fq%3DDBD::pg%2Bcyg win%2BPostgreSQL%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26start%3D10%26 sa%3DN ----- Original Message ----- From: "Andrew McMillan" <andrew@catalyst.net.nz> To: "Ronald Schmidt" <ronaldws@software-path.com> Cc: <pgsql-novice@postgresql.org> Sent: Monday, February 03, 2003 2:13 PM Subject: Re: [NOVICE] Can't connect to postgresql on win32 using Perl > On Tue, 2003-02-04 at 03:24, Ronald Schmidt wrote: > > As my original email stated, I have postmaster running as a service. > > I have looked at all three of the files you mentioned and do not > > understand why their default configurations would interfere with > > connections from Perl DBI/DBD. > > pg_hba.conf defines the limitations to access and authenticate with the > database - that's the most likely of the three to need editing in your > case. > > I've never used the Windows version so I don't know if it supports local > socket access, but for TCP access you need to ensure you are running > PostgreSQL with the -i switch. > > Is there a Windows equivalent to "netstat"? You might check to see > whether the DB is listening. > > Cheers, > Andrew. > -- > --------------------------------------------------------------------- > Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington > WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St > DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267 > Survey for nothing with http://survey.net.nz/ > --------------------------------------------------------------------- > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >
For version of server use: select version(); For version of psql use: psql -V Cheers, Steve On Monday 03 February 2003 5:08 pm, Jonathon Batson wrote: > Hi... > > Does anyone know the command to find the current version # of Postgres?? > > Thanks > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org