Re: [GENERAL] Q: documentation bug ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: [GENERAL] Q: documentation bug ?
Date: 2016-02-04 16:01:19
Message-ID: 17541.1454601679@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message FarjadFarid(ChkNet) 2016-02-04 16:46:44 Asp.net 5 and EF6
Previous Message David Steele 2016-02-04 15:08:41 Re: Hot standby and xlog on a ramdisk

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Moore 2016-02-04 16:19:37 Re: update without SET ?
Previous Message Karsten Hilbert 2016-02-04 11:05:32 Re: [SQL] Q: documentation bug ?