From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Phil Sorber <phil(at)omniti(dot)com> |
Cc: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [WIP] pg_ping utility |
Date: | 2012-11-16 05:28:40 |
Message-ID: | 4920.1353043720@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Phil Sorber <phil(at)omniti(dot)com> writes:
> On Thu, Nov 15, 2012 at 10:55 PM, Michael Paquier
> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> Hum, it is not really consistent to use a magic number here, particularly in
>> the case where an additional state would be added in the enum PGPing. So why
>> not simply return PQPING_NO_ATTEMPT when there are incorrect options or you
>> show the help and exit? Looks like the best option here.
> Good point. I will make that change as well.
Maybe I missed something here, but I believe it's standard that
"program --help" should result in exit(0), no matter what the program's
exitcode conventions are for live-fire exercises. (See
handle_help_version_opts() in the bin/scripts/ programs, for example.)
Okay to use NO_ATTEMPT for erroneous arguments, though.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2012-11-16 05:43:58 | Re: autovacuum truncate exclusive lock round two |
Previous Message | Karl O. Pinc | 2012-11-16 05:08:06 | Re: gset updated patch |