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

From Sawada Masahiko
Subject Re: Proposal : REINDEX xxx VERBOSE
Date
Msg-id CAD21AoBL6mzXchPr2eO0uBRupzk3bxd+QmWNbUMEEkdZs+C1yg@mail.gmail.com
Whole thread Raw
In response to Re: Proposal : REINDEX xxx VERBOSE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Proposal : REINDEX xxx VERBOSE  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
On Wed, Feb 4, 2015 at 2:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
>> On 2/3/15 5:08 PM, Tom Lane wrote:
>>> Jim Nasby <Jim.Nasby@bluetreble.com> writes:
>>>> VACUUM puts the options before the table name, so ISTM it'd be best to
>>>> keep that with REINDEX. Either REINDEX (options) {INDEX | ...} or
>>>> REINDEX {INDEX | ...} (options).
>
>>> Well, I really really don't like the first of those.  IMO the command name
>>> is "REINDEX INDEX" etc, so sticking something in the middle of that is
>>> bogus.
>
>> Actually, is there a reason we can't just accept all 3? Forcing people
>> to remember exact ordering of options has always struck me as silly.
>
> And that's an even worse idea.  Useless "flexibility" in syntax tends to
> lead to unfortunate consequences like having to reserve keywords.
>

As per discussion, it seems to good with
REINDEX { INDEX | TABLE | etc } name [ ( option [, option ...] ) ]
or
REINDEX { INDEX | TABLE | etc } [ (option [, optoin ...] ) ] name
i.g., the options of reindex(VERBOSE and FORCE) are put at before or
after object name.

Because other maintenance command put option at before object name, I
think the latter is better.

Regards,

-------
Sawada Masahiko



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ecpg array support, or lack thereof
Next
From: Heikki Linnakangas
Date:
Subject: Re: _pg_relbuf() Relation paramter