Re: Inconsistent application of [, ...] in documentation - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Inconsistent application of [, ...] in documentation
Date
Msg-id CAKFQuwZH_OdMKexkN5bVOiSQ_U6oGJus9WVCTQyFgLC3yPB8pQ@mail.gmail.com
Whole thread Raw
In response to Inconsistent application of [, ...] in documentation  (Oliver Rice <oliver@oliverrice.com>)
Responses Re: Inconsistent application of [, ...] in documentation  (Oliver Rice <oliver@oliverrice.com>)
List pgsql-bugs
On Wed, Jan 27, 2021 at 10:37 AM Oliver Rice <oliver@oliverrice.com> wrote:

"( first_param TEXT, second_param TEXT )"
Incorrect Usage:
"( first_param TEXT, TEXT)"

--
So in Variant A, "[, ...]" is intended to apply to the immediately preceding token but in variant B it is intended to apply to all preceding tokens in the same group.

But (TEXT, TEXT) is valid.

The reality is that there is a trade-off between explicitness and readability (human usability).  Complaints strictly about inconsistency are not going to be acted upon.  Specific documentation will be improved upon given sufficient demonstration of a usability problem AND the available of a more usable alternative. That the wrong choice will simply "fail fast" in cases where the capturing of the repetition is ambiguous, and there are examples to make clear which is correct, causes one to err on the side of readability for the synopsis (which is unique to each command) rather than consistency between commands.

David J.


pgsql-bugs by date:

Previous
From: Oliver Rice
Date:
Subject: Inconsistent application of [, ...] in documentation
Next
From: Tom Lane
Date:
Subject: Re: BUG #16840: Rows not found in table partitioned by hash when not all partitions exists