Re: Proposal : REINDEX xxx VERBOSE

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal : REINDEX xxx VERBOSE
Date: 2015-02-05 02:02:03
Message-ID: 1423101723213-5836782.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane-2 wrote
> Kyotaro HORIGUCHI &lt;

> horiguchi(dot)kyotaro(at)(dot)co

> &gt; 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-02-05 02:19:14 Re: Redesigning checkpoint_segments
Previous Message Ian Barwick 2015-02-05 02:00:59 Re: Docs: CREATE TABLESPACE minor markup fix