Re: Proposal : REINDEX xxx VERBOSE

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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 14:44:09
Message-ID: CAFcNs+rsc+D=G5S3CWqUG7CEWMjpGdG2JKhOcrCspwPh1CLnAw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 3, 2015 at 9:09 AM, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
wrote:
>
> On Tue, Feb 3, 2015 at 12:32 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com> writes:
> >> On Mon, Feb 2, 2015 at 9:21 PM, Michael Paquier
> >> <michael(dot)paquier(at)gmail(dot)com> wrote:
> >>> Now, I think that it may
> >>> be better to provide the keyword VERBOSE before the type of object
> >>> reindexed as REINDEX [ VERBOSE ] object.
> >
> >> Actually, my first WIP version of patch added VERBOSE word at before
> >> type of object.
> >> I'm feeling difficult about that the position of VERBOSE word in
> >> REINDEX statement.
> >
> > 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];
>
> Thought?
>

I don't think the keyworks INDEX, TABLE, SCHEMA, SYSTEM and DATABASE are
options... they are part of the command IMHO.

Maybe something like:

REINDEX { INDEX | TABLE | SCHEMA | SYSTEM | DATABASE } [( [ FORCE ],
[VERBOSE] ) ] name;

And maintain the old syntax for compatibility of course.

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-02-03 14:51:29 Re: Release note bloat is getting out of hand
Previous Message Andrew Dunstan 2015-02-03 14:08:45 Re: Release note bloat is getting out of hand