pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Giffin <david@agent911.com>
Cc: Ken J. Wright <ken@ori-ind.com>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Win32 interface
Date: Fri, 03 Sep 1999 10:40:51 -0400
Message-ID: <12509.936369651@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSF.4.05.9909021448040.64764-100000@central.agent911.com>

David Giffin <david@agent911.com> 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



view thread (12+ messages)  latest in thread

Message-ID: <12509.936369651@sss.pgh.pa.us>
Permalink:  ../12509.936369651@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12509.936369651@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david@agent911.com, ken@ori-ind.com
  Subject: Re: [INTERFACES] Win32 interface
  In-Reply-To: <12509.936369651@sss.pgh.pa.us>

* 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