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

From Tom Lane
Subject Re: Proposal : REINDEX xxx VERBOSE
Date
Msg-id 2737.1422976803@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal : REINDEX xxx VERBOSE  (Sawada Masahiko <sawada.mshk@gmail.com>)
Responses Re: Proposal : REINDEX xxx VERBOSE  (Andres Freund <andres@2ndquadrant.com>)
Re: Proposal : REINDEX xxx VERBOSE  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
Sawada Masahiko <sawada.mshk@gmail.com> writes:
> On Tue, Feb 3, 2015 at 12:32 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The way that FORCE was added to REINDEX was poorly thought out; let's not
>> double down on that with another option added without any consideration
>> for future expansion.  I'd be happier if we adopted something similar to
>> the modern syntax for VACUUM and EXPLAIN, ie, comma-separated options in
>> parentheses.

> I understood.
> I'm imagining new REINDEX syntax are followings.
> - REINDEX (INDEX, VERBOSE) hoge_idx;
> - REINDEX (TABLE) hoge_table;

> i.g., I will add following syntax format,
> REINDEX ( { INDEX | TABLE | SCHEMA | SYSTEM | DATABASE } , [VERBOSE] )
> name [FORCE];

Well, the object type is not an optional part of the command.  It's
*necessary*.  I was thinking more like

REINDEX { INDEX | TABLE | etc } name [ ( option [, option ...] ) ]

option := FORCE | VERBOSE

We'd still keep the historical syntax where you can write FORCE outside
parens, but it'd be deprecated.

Where to insert the parenthesized option list is a judgment call,
but I'd lean to keeping it at the end where FORCE used to be.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Redesigning checkpoint_segments
Next
From: Andres Freund
Date:
Subject: Re: Proposal : REINDEX xxx VERBOSE