Re: [SQL] Q: documentation bug ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Q: documentation bug ?
Дата
Msg-id 17541.1454601679@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] Q: documentation bug ?  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: David Steele
Дата:
Сообщение: Re: Hot standby and xlog on a ramdisk
Следующее
От: "FarjadFarid\(ChkNet\)"
Дата:
Сообщение: Asp.net 5 and EF6