Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA78496 for ; Fri, 3 Sep 1999 10:42:50 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA12511; Fri, 3 Sep 1999 10:40:51 -0400 (EDT) To: David Giffin cc: "Ken J. Wright" , pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Win32 interface In-reply-to: Your message of Thu, 2 Sep 1999 14:57:49 -0700 (PDT) Date: Fri, 03 Sep 1999 10:40:51 -0400 Message-ID: <12509.936369651@sss.pgh.pa.us> From: Tom Lane David Giffin writes: > Yep I'm using the PQconnectDB("host=blah user=blah dbname=blah"); > I noticed that psql.c uses the PQsetdbLogin maybe I should switch to that > function if this one is broken? Would have to parse a little extra but.. >>>> >>>> connectDB() -- unknown hostname: mobile Assuming that "mobile" is the hostname you gave it, then parsing the connectinfo string is not the problem. The error message is coming out because gethostbyname() is failing --- cf. connectDB() in interfaces/libpq/fe-connect.c. (Or, perchance, it is succeeding but delivering a non-INET address? Seems unlikely but if your LAN runs on non-TCP protocols then that's possible.) My guess is that there is something broken with DNS name resolution on your setup. Hard to tell what from this much info. You might try making a one-liner program that just calls gethostbyname, and work on debugging that simpler situation. regards, tom lane