Re: Patch (2): Implement failover on libpq connect level.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Patch (2): Implement failover on libpq connect level.
Дата
Msg-id CA+TgmoYrCaHamM6fOYmkBqL5hJ9VXufevgXX4dBKaUfiQuASeg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Patch (2): Implement failover on libpq connect level.  (Korry Douglas <korry.douglas@enterprisedb.com>)
Ответы Re: Patch (2): Implement failover on libpq connect level.  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Fri, Oct 23, 2015 at 4:02 PM, Korry Douglas
<korry.douglas@enterprisedb.com> wrote:
> When you call pg_is_in_recovery(), you should schema-qualify the function
> name, just in case some other version of that function exists in the
> search_path.

I wonder whether it's really a good idea to put this kind of logic
into libpq at all.  I think there was some previous votes against
doing so, and I tend to agree with that viewpoint.  Shouldn't probing
for the state of the connection be the caller's job, not libpq's?  If
somebody wants to write a wrapper function around this that runs this
query after connecting - or any other query - they can do so.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Parallel Seq Scan
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Proposal: Trigonometric functions in degrees