Re: [SQL] Q: documentation bug ? - Mailing list pgsql-general

From Tom Lane
Subject Re: [SQL] Q: documentation bug ?
Date
Msg-id 17541.1454601679@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] Q: documentation bug ?  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
Karsten Hilbert <Karsten.Hilbert@gmx.net> writes:
> On Thu, Feb 04, 2016 at 12:00:45PM +0100, Vik Fearing wrote:
>>> REINDEX [ ( { VERBOSE } [, ...] ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name

>>> Does this constitute a bug in the documentation or in the Debian version of PG ?

>> Neither.  It's a little bit obscure because {} and [] mean special
>> things, but () doesn't.

> Eagle-eyed !

Seems to me the syntax BNF here is bringing the problem on itself by using
{ ... } when in fact only one alternative is available.  I don't find
{ FOO | BAR } especially hard to read, but { FOO } is confusing because
you expect the {}'s to mean something and they really do not.

I'd be inclined to reduce this to

REINDEX [ ( VERBOSE ) ] { INDEX | TABLE | SCHEMA | DATABASE | SYSTEM } name

We can put back the extra decoration when and if a second option arrives.

            regards, tom lane


pgsql-general by date:

Previous
From: David Steele
Date:
Subject: Re: Hot standby and xlog on a ramdisk
Next
From: "FarjadFarid\(ChkNet\)"
Date:
Subject: Asp.net 5 and EF6