Skip site navigation (1) Skip section navigation (2)

Re: new to Unixodbc: can't connect to Postgresql

From: Richard Huxton <dev(at)archonet(dot)com>
To: lchan <lchan(at)mail(dot)arc(dot)nasa(dot)gov>
Cc: mombasa(at)ptolemy(dot)arc(dot)nasa(dot)gov,quit Nguyen <qnguyen(at)mail(dot)arc(dot)nasa(dot)gov>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: new to Unixodbc: can't connect to Postgresql
Date: 2004-09-08 07:22:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
lchan wrote:
> Hi Richard,
> Thank you for responding to my plea for help.

No problem - please try to keep the mailing list cc'ed - there are 
smarter people than me on it.

>> 1. Make sure you are logging connection attempts in postgresql.conf 
>> and see if anything is happening there.
> I have double checked the postgresql.conf  file.  There's only a trace 
> file produced, and it's a SQLERROR -2 (SQL_INVALID_HANDLE). 

This is the odbc logs - we also want to look at the postgresql logs. 
Their location is usually defined in your postgresql startup script.

 > Pasted
> below is my postgres.conf file.  I would be very grateful if you let me 
> know, if
> you spot anything that's incorrect.

Where is postgresql logging to? Find out, then add the following lines 
to your postgresql.conf:


Restart postgresql and this will then log every connection and every SQL 
  statement you send.

Connect using "psql -h localhost -U myuser mydatabase", you should be 
asked for your password and get a prompt. Check the logs to make sure 
the successful connection is logged.

Then try to connect via odbc and see what the postgresql logs say.

   Richard Huxton
   Archonet Ltd

In response to

pgsql-odbc by date

Next:From: Christof GlaserDate: 2004-09-08 11:03:11
Subject: Re: No fun with MS Access and Latin1
Previous:From: Philippe LangDate: 2004-09-08 06:21:28
Subject: Re: No fun with MS Access and Latin1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group