Re: Proposal : REINDEX xxx VERBOSE - Mailing list pgsql-hackers

From David G Johnston
Subject Re: Proposal : REINDEX xxx VERBOSE
Date
Msg-id 1423101723213-5836782.post@n5.nabble.com
Whole thread Raw
In response to Re: Proposal : REINDEX xxx VERBOSE  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Ian Barwick
Date:
Subject: Re: Docs: CREATE TABLESPACE minor markup fix
Next
From: Jim Nasby
Date:
Subject: Re: Redesigning checkpoint_segments