Re: Long options for pg_ctl waiting

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Vik Fearing <vik(at)2ndquadrant(dot)fr>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Long options for pg_ctl waiting
Date: 2016-09-07 19:31:13
Message-ID: CA+Tgmob_VRVeKh_c-b0J_AUKz3x_mqvG+dWTeu_RRNL1BWU5pw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Sep 3, 2016 at 7:13 PM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)com> wrote:
> On Sun, Sep 4, 2016 at 5:57 AM, Vik Fearing <vik(at)2ndquadrant(dot)fr> wrote:
>> One thing that has been irking me ever since I came to PostgreSQL is the
>> fact that pg_ctl -w (and -W) don't have longhand equivalents. I like to
>> use the long version in scripts and such as extra documentation, and
>> I've never been able to with these. What's more, I keep forgetting that
>> --wait (and --no-wait) aren't a thing.
>>
>> Trivial patch attached.
>
> Nit: Like --nosync we could use --nowait, without an hyphen.

But is that actually better? I think that the idea of omitting the
dash here is one of those things that sounds good at first, and then
later you realize that it was actually a dumb idea all along. If
somebody has an option for --body or --on or --table and has to negate
it by running --nobody or --noon or --notable, some confusion may
result, because in each case you get a word that is not really the
logical inverse of the original option. Also, if you end up with any
multi-word options, like --save-backup-files, then users wonder why
the opposite, --nosave-backup-files, has a dash between words 2 and 3
and between words 3 and 4, but not between words 1 and 2. I suggest
we'd do better to standardize on always including a dash in such
cases.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Flower 2016-09-07 19:38:28 Re: Long options for pg_ctl waiting
Previous Message Marko Tiikkaja 2016-09-07 18:49:25 Re: SELECT FOR UPDATE regression in 9.5