From: Richard Huxton <dev@archonet.com>
To: lchan <lchan@mail.arc.nasa.gov>
Cc: mombasa@ptolemy.arc.nasa.gov
Cc: quit Nguyen <qnguyen@mail.arc.nasa.gov>
Cc: pgsql-odbc@postgresql.org
Subject: Re: new to Unixodbc: can't connect to Postgresql
Date: Wed, 08 Sep 2004 08:22:06 +0100
Message-ID: <413EB31E.5070500@archonet.com> (raw)
In-Reply-To: <6.1.0.6.0.20040907142637.028725b0@mail.arc.nasa.gov>
References: <55fe1952.0409021316.7eea93f8@posting.google.com>
<413829A1.5010309@archonet.com>
<6.1.0.6.0.20040907142637.028725b0@mail.arc.nasa.gov>
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:
log_connections=true
log_statement=true
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: dev@archonet.com, lchan@mail.arc.nasa.gov, mombasa@ptolemy.arc.nasa.gov, qnguyen@mail.arc.nasa.gov
Subject: Re: new to Unixodbc: can't connect to Postgresql
In-Reply-To: <413EB31E.5070500@archonet.com>
References: <55fe1952.0409021316.7eea93f8@posting.google.com> <413829A1.5010309@archonet.com> <6.1.0.6.0.20040907142637.028725b0@mail.arc.nasa.gov> <413EB31E.5070500@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox