Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types
Дата
Msg-id 20180314021735.GI1150@paquier.xyz
обсуждение исходный текст
Ответ на Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
On Fri, Mar 09, 2018 at 04:42:30PM -0500, Peter Eisentraut wrote:
> It seems, however, that PGhost() has always been broken for hostaddr
> use.  In 9.6 (before the multiple-hosts stuff was introduced), when
> connecting to "hostaddr=127.0.0.1", PGhost() returns "/tmp".  Urgh.
>
> I think we should decide what PGhost() is supposed to mean when hostaddr
> is in use, and then make a fix for that consistently across all versions.

Hm.  The only inconsistency I can see here is when "host" is not defined
but "hostaddr" is, so why not make PQhost return the value of "hostaddr"
in this case?
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: ALTER TABLE ADD COLUMN fast default
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: User defined data types in Logical Replication