Re: odd psql behaviour on OSX

From: "Robert J(dot) Sanford, Jr(dot)" <rsanford(at)nolimitsystems(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: odd psql behaviour on OSX
Date: 2002-04-26 15:12:13
Message-ID: PHENKEEPJCPAMKFKNEOGGEOMDEAA.rsanford@nolimitsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

please also remember that it was not all of the dotted quads that
were failing. testing against two public ip addresses and two non-
routable addresses one of the two public ip addresses was working.

that leads me to believe that it isn't a dotted quad issue but a
configuration issue.

some time later today i'm going to follow tom lane's advice and
start posting to an osx hacker list or two or four to see if they
know what's going on. i'm thinking some sort of configuration
issue since adding the machines to the netinfo manager made them
work all of the sudden.

rjsjr

> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Steve Atkins
> Sent: Thursday, April 25, 2002 6:04 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] odd psql behaviour on OSX
>
>
> On Thu, Apr 25, 2002 at 05:50:00PM -0400, Tom Lane wrote:
> > "Robert J. Sanford, Jr." <rsanford(at)nolimitsystems(dot)com> writes:
> > > i have to say that i don't understand why psql could not see
> the servers
> > > without this. actually, i'm guessing from previous emails
> that it isn't
> > > psql but one of the system libs that psql uses that needs
> some addresses
> > > to be explicity mapped. i just don't understand.
> >
> > Me either. You'd likely have more luck asking about it in an OS X
> > hackers' forum than here, though. Just tell 'em the program is trying
> > to look up so-and-so with gethostbyname(), and getting a failure return.
>
> Uhm, I've not looked at this bit of psql source code and I've never
> worked with OS X, so I may be completely off-base here, but noones
> mentioned this possibility yet.
>
> gethostbyname(3) is specced to take a hostname and return hostent.
> If you pass it the string "192.168.1.1" it is specced to look up the
> *hostname* 192.168.1.1 and return the addresses associated with that
> hostname.
>
> This is hidden by the fact that some system resolver libraries
> recognise a query for a dotted-quad address and fake up a response,
> and still more so by some recursive resolvers that'll do the same
> thing.
>
> The robust way to parse a hostname/address passed in by a user is to
> attempt an inet_aton or inet_pton on it, and only if that fails attempt
> a gethostbyname(3).
>
> Is it possible that this is causing the symptoms here?
>
> Cheers,
> Steve
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-04-26 15:19:07 Re: requesting features in PostgreSQL
Previous Message Tom Lane 2002-04-26 15:03:52 Re: large object dump-restore problem(bug?)