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 20180327043200.GA9940@paquier.xyz
обсуждение исходный текст
Ответ на Re: PQHost() undefined behavior if connecting string contains bothhost and hostaddr types  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-hackers
On Mon, Mar 26, 2018 at 09:03:17PM -0700, David G. Johnston wrote:
> And yes, while I'm not sure right now what the multi-value condition logic
> results in it should be mentioned - at least if the goal of the docs is to
> be a sufficient resource for using these functions.  In particular what
> happens when the connection is inactive (unless that falls under "cannot be
> evaluated"...).

Yes, the fast that it is not possible to rely on the return value for
multiple hosts as long as the connection is not sanely established needs
to be documented anyway.  For example if a client uses PQconnectStart()
for an asynchronous start then connhost is initialized with whichhost
set to 0, so PQhost won't return an empty string.
--
Michael

Вложения

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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: ON CONFLICT DO UPDATE for partitioned tables
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] why not parallel seq scan for slow functions