Re: Problem with NT 4.0 / driver 08.01.0102 - Mailing list pgsql-odbc

From Ludek Finstrle
Subject Re: Problem with NT 4.0 / driver 08.01.0102
Date
Msg-id 20060123161454.GA24379@soptik.pzkagis.cz
Whole thread Raw
In response to Re: Problem with NT 4.0 / driver 08.01.0102  ("Philippe Lang" <philippe.lang@attiksystem.ch>)
List pgsql-odbc
> I guess the problem comes from libpq, because on this exact same computer, a
> simple switch from psqlodbc 7.030.208 to 08.01.0102 and the problem arises.
> 172.17.0.4 is accessible and used by many people, no problem on the server
> side.

:-( Bad information.

> Is libpq maybe incompatible with Windows NT 4.0? Or may a bug with name
> resolution under NT 4.0?

I don't know. You have to search the pgsql-interfaces archive. Maybe
try google. Maybe someone else know it.
BTW what about service pack?

I see in psqlODBC that it use only host=xxx - use host name lookups.
I don't know what is problematic in host name lookups in WinNT 4.0.
There is hostaddr=yyy in libpq which doesn't use host name lookups.
So if you could compile psqlODBC yourself I advise you change
lines in function LIBPQ_connect in connection.c:
- conninfo = (char *)malloc((sizeof(char) * strlen(" host=") + strlen(self->connInfo.server) + 1));
+ conninfo = (char *)malloc((sizeof(char) * strlen(" hostaddr=") + strlen(self->connInfo.server) + 1));
- conninfo = strcpy(conninfo," host=");
+ conninfo = strcpy(conninfo," hostaddr=");

(- means original line, + means new line). I don't see trivial patch
for this behaviour yet so I can't create official patch for it.

> Here is the mylog output:

Don't you strip it from begin? Or do you enable mylog output
under Global button? Some informations is missing.

>
> [158]Could not establish connection to the database; LIBPQ returned -> could
> not translate host name "172.17.0.4" to address: Unknown host
>
> [158]CONN ERROR: func=PGAPI_DriverConnect, desc='Error from CC_Connect',
> errnum=113, errmsg='could not translate host name "172.17.0.4" to address:
> Unknown host

Regards,

Luf

pgsql-odbc by date:

Previous
From: "Philippe Lang"
Date:
Subject: Re: Problem with NT 4.0 / driver 08.01.0102
Next
From: "lothar.behrens@lollisoft.de"
Date:
Subject: Strange problem ?