From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Korry Douglas <korry(dot)douglas(at)enterprisedb(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Patch (2): Implement failover on libpq connect level. |
Date: | 2015-10-24 11:55:59 |
Message-ID: | CA+TgmoYrCaHamM6fOYmkBqL5hJ9VXufevgXX4dBKaUfiQuASeg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-jdbc |
On Fri, Oct 23, 2015 at 4:02 PM, Korry Douglas
<korry(dot)douglas(at)enterprisedb(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2015-10-24 12:14:17 | Re: Proposal: Trigonometric functions in degrees |
Previous Message | Robert Haas | 2015-10-24 11:49:07 | Re: Parallel Seq Scan |
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2015-10-24 12:45:21 | Re: JDBC driver debug out? |
Previous Message | Dave Cramer | 2015-10-24 11:15:36 | Re: [HACKERS] JDBC driver debug out? |