Received: from central.agent911.com (central.agent911.com [207.189.131.15]) by hub.org (8.9.3/8.9.3) with ESMTP id QAA26637 for ; Fri, 3 Sep 1999 16:27:52 -0400 (EDT) (envelope-from david@agent911.com) Received: from localhost (david@localhost) by central.agent911.com (8.9.2/8.9.2) with ESMTP id NAA67450; Fri, 3 Sep 1999 13:26:30 -0700 (PDT) Date: Fri, 3 Sep 1999 13:26:30 -0700 (PDT) From: David Giffin To: Tom Lane cc: "Ken J. Wright" , pgsql-interfaces@postgreSQL.org Subject: Re: [INTERFACES] Win32 interface In-Reply-To: <12509.936369651@sss.pgh.pa.us> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I figured out what was happening... Or at least what seem to happen. When I linked in lipq.lib it would return unknown hostname. I switched it to the libpqdll.lib and it worked fine. I thought that libpq.lib would statically complie postgres into the .exe but it didn't seem to work. David On Fri, 3 Sep 1999, Tom Lane wrote: > 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 >