Re: Proposal : REINDEX xxx VERBOSE

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal : REINDEX xxx VERBOSE
Date: 2015-02-03 15:23:30
Message-ID: 20150203152330.GK25227@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-02-03 10:20:03 -0500, Tom Lane wrote:
> Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> writes:
> > On Tue, Feb 3, 2015 at 12:32 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

Why would we allow force inside the parens, given it's a backward compat
only thing afaik? Don't get me wrong, I'm not at all against a
extensible syntax, I just don't see a point in further cargo culting
FORCE.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-02-03 15:30:01 Re: Unnecessary pointer-NULL checks in pgp-pgsql.c
Previous Message Tom Lane 2015-02-03 15:20:03 Re: Proposal : REINDEX xxx VERBOSE