Re: Proposal : REINDEX xxx VERBOSE

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: Proposal : REINDEX xxx VERBOSE
Дата
Msg-id 1423101723213-5836782.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Proposal : REINDEX xxx VERBOSE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane-2 wrote
> Kyotaro HORIGUCHI <

> horiguchi.kyotaro@.co

> > writes:
>> The phrase "{INDEX | TABLE |..} name" seems to me indivisible as
>> target specification. IMHO, the options for VACUUM and so is
>> placed *just after* command name, not *before* the target.
> 
>> If this is right, the syntax would be like this.
> 
>> REINDEX [ (option [, option ...] ) ] {INDEX | TABLE | etc } name
> 
>> What do you think about this?
> 
> I think this is wrong and ugly.  INDEX etc are part of the command name.

I can argue either position...

I lean toward those not being part of the command name because:

The documentation lists only "REINDEX" as a command while "DROP" gets a
separate entry for each type of object it is able to drop; mainly because
the behavior of each command could/does differ based upon the target while
REINDEX will still simply cause indexes to be rebuilt and the modifier's
purposes is to aid in the selection of target indexes.

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

That said, the entire notes section is written like the writer also believed
that "REINDEX INDEX" is a command in its own right...

VACUUM is a good comparison command and, besides, putting VERBOSE after the
entire thing just doesn't seem right - though that is the only other option
that would work for me.  When you read other commands with pre and post
options the wording usually flows reasonably well (IF EXISTS being, for me,
an exception - it reads better after the name, not before, but I
digress...).  REINDEX ( VERBOSE ) /target/ reads well to me; I'm already
sold that "TABLE name" and "INDEX name" are target specifiers.

David J.




--
View this message in context: http://postgresql.nabble.com/Proposal-REINDEX-xxx-VERBOSE-tp5836377p5836782.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ian Barwick
Дата:
Сообщение: Re: Docs: CREATE TABLESPACE minor markup fix
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Redesigning checkpoint_segments