Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)

From: Phil Sorber <phil(at)omniti(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pg_isready (was: [WIP] pg_ping utility)
Date: 2013-02-05 17:44:15
Message-ID: CADAkt-jAvZUchjnNO7-W6sNHyvAJS6yzXKCDKrsOugC3aMBwjg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 5, 2013 at 9:08 AM, Phil Sorber <phil(at)omniti(dot)com> wrote:
> On Tue, Feb 5, 2013 at 9:06 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>> Phil Sorber escribió:
>>> On Tue, Feb 5, 2013 at 6:41 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> > On Sat, Feb 2, 2013 at 9:55 PM, Phil Sorber <phil(at)omniti(dot)com> wrote:
>>> >> OK, here is the patch that handles the connection string in dbname.
>>> >> I'll post the other patch under a different posting because I am sure
>>> >> it will get plenty of debate on it's own.
>>> >
>>> > I'm sorry, can you remind me what this does for us vs. the existing coding?
>>> >
>>>
>>> It's supposed to handle the connection string passed as dbname case to
>>> be able to get the right output for host:port.
>>
>> Surely the idea is that you can also give it a postgres:// URI, right?
>
> Absolutely.

Here is it. I like this approach more than the previous one, but I'd
like some feedback.

There still seems to be a bit of a disconnect in libpq in my opinion.
Taking options as a string (URI or conninfo) or a set of arrays, but
returning info about connection parameters in PQconninfoOption? And
nothing that takes that as an input. Seems odd to me.

>
>>
>> --
>> Álvaro Herrera http://www.2ndQuadrant.com/
>> PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
pg_isready_con_str_v2.diff application/octet-stream 7.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Byrne 2013-02-05 18:13:07 Exposing ArrayBuildState to pl/pgsql
Previous Message Seamus Abshere 2013-02-05 17:29:09 Alias hstore's ? to ~ so that it works with JDBC