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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Stuart Grimshaw" <stuart(at)smgsys(dot)fsnet(dot)co(dot)uk>
Cc: "Postgres-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: ODBC
Date: 2000-05-29 17:21:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
"Stuart Grimshaw" <stuart(at)smgsys(dot)fsnet(dot)co(dot)uk> writes:
> I'm having a problem connecting to my Postgres server with ODBC.
> When I try and connect I get the error :

> Could not connect to the server;
> Could not connect to remote socket

> I'm using Postgres v7.0, and I've allowed my local network
> ( access through pg_hba.conf with :

> host    all    trust

> the IP of the machine I'm connecting from is, so that's covered.

That pg_hba.conf entry looks OK, but I suspect that you are not getting
as far as having the postmaster consult that file.  Looking at the code
of our ODBC driver, I see that the error message "Could not connect to
remote socket." is issued in only one place, namely if the connect()
kernel call fails.  That means that you are unable to open a channel to
the postmaster at all, let alone try to be authenticated as an allowed
host/user.  I suspect network-level problems, or possibly specification
of the wrong port number for the postmaster (though you say you checked

Unfortunately the ODBC code neglects to notice exactly why the connect()
call failed --- it'd be mighty useful here to know what errno code the
kernel returned.  I'd suggest trying it with a libpq-based client,
which will include the kernel error code in its error message in this
situation, or else altering the ODBC code to print out errno when it
gets this failure.  That'd give us something more to go on.

			regards, tom lane

In response to

  • ODBC at 2000-05-29 10:04:36 from Stuart Grimshaw


  • Re: ODBC at 2000-05-29 16:48:54 from Lamar Owen
  • Re: ODBC at 2000-05-29 17:47:29 from Charles Tassell
  • Re: ODBC at 2000-05-30 07:04:50 from Stuart Grimshaw

pgsql-general by date

Next:From: Tom LaneDate: 2000-05-29 17:29:24
Subject: Re: postdrv & 'query string to long' revisted
Previous:From: Lamar OwenDate: 2000-05-29 16:48:54
Subject: Re: ODBC

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