Skip site navigation (1) Skip section navigation (2)

Re: IPv6 connection

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: IPv6 connection
Date: 2010-01-12 21:35:12
Message-ID: 4B4CEB10.504@lelarge.info (view raw or flat)
Thread:
Lists: pgadmin-hackers
Le 12/01/2010 10:36, Magnus Hagander a écrit :
> On Tue, Jan 12, 2010 at 07:00, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>> On Tue, Jan 12, 2010 at 4:01 AM, Guillaume Lelarge
>> <guillaume(at)lelarge(dot)info> wrote:
>>
>>> Actually, I'm wondering why we try to resolve the hostname on pgAdmin.
>>> libpq already does this. Can't we just push the string to libpq and let
>>> it resolve the string address? it would be a more simple fix for our issue.
>>
>> If memory serves, it's required to get Kerberos to work properly.
>> Magnus may recall more.
> 
> I think you have that one backwards. Kerberos *requires* the hostname,
> it doesn't work if you just supply the IP address.
> 
> I have no idea why we do the resolving in pgAdmin, but Kerberos
> certainly isn't the reason. Maybe it's some reasoning around being
> able to control the error message if it fails?
> 

I deleted the resolving code to check what kind of error I would get.

With the resolving code:

  Could not resolve hostname ip6-localhostaa

Without the resolving code:

  Error connecting to the server: could not translate host name
  "ip6-localhostaa" to address: Name or service not known

They all can be translated, but the first one need a translation on
pgAdmin, and the second one need a translation on PostgreSQL.

Moreover, I tried to find when the resolving code appeared. It seems it
was there since the beginning (2003 IIRC).

I would be much in favor of dropping the code. Probably because I can't
get the Windows code to work :) I tried to add some headers, but to no
avail.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com

In response to

Responses

pgadmin-hackers by date

Next:From: Dave PageDate: 2010-01-13 03:47:48
Subject: Re: IPv6 connection
Previous:From: Magnus HaganderDate: 2010-01-12 09:36:38
Subject: Re: IPv6 connection

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group