Re: Proposal : REINDEX xxx VERBOSE

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(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-03-11 21:36:55
Message-ID: 5500B577.5070200@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/11/15 6:33 AM, Sawada Masahiko wrote:
>>>>>> As a refresher, current commands are:
>>>>>> >>>>>
>>>>>> >>>>> VACUUM (ANALYZE, VERBOSE) table1 (col1);
>>>>>> >>>>> REINDEX INDEX index1 FORCE;
>>>>>> >>>>> COPY table1 FROM 'file.txt' WITH (FORMAT csv);
>>>>>> >>>>> CREATE MATERIALIZED VIEW mv1 WITH (storageparam, ...) AS qry WITH
>>>>>> >>>>>DATA;
>>>>>> >>>>> CREATE EXTENSION ext1 WITH SCHEMA s1 VERSION v1 FROM over;
>>>>>> >>>>> CREATE ROLE role WITH LOGIN;
>>>>>> >>>>> GRANT .... WITH GRANT OPTION;
>>>>>> >>>>> CREATE VIEW v1 AS qry WITH CASCADED CHECK OPTION;
>>>>>> >>>>> ALTER DATABASE db1 WITH CONNECTION LIMIT 50;
>>>>>> >>>>> DECLARE c1 INSENSITIVE SCROLL CURSOR WITH HOLD;
>>>> >>>
>>>> >>>
>>>> >>>
>>>> >>>BTW, I'm fine with Tom's bare-word with WITH idea. That seems to be the
>>>> >>>most
>>>> >>>consistent with everything else. Is there a problem with doing that? I
>>>> >>>know
>>>> >>>getting syntax is one of the hard parts of new features, but it seems
>>>> >>>like
>>>> >>>we reached consensus here...
>>> >>
>>> >>
>>> >>Attached is latest version patch based on Tom's idea as follows.
>>> >>REINDEX { INDEX | ... } name WITH ( options [, ...] )
>> >
>> >
>> >Are the parenthesis necessary? No other WITH option requires them, other
>> >than create table/matview (COPY doesn't actually require them).
>> >
> I was imagining EXPLAIN syntax.
> Is there some possibility of supporting multiple options for REINDEX
> command in future?
> If there is, syntax will be as follows, REINDEX { INDEX | ... } name
> WITH VERBOSE, XXX, XXX;
> I thought style with parenthesis is better than above style.

The thing is, ()s are actually an odd-duck. Very little supports it, and
while COPY allows it they're not required. EXPLAIN is a different story,
because that's not WITH; we're actually using () *instead of* WITH.

So because almost all commands that use WITH doen't even accept (), I
don't think this should either. It certainly shouldn't require them,
because unlike EXPLAIN, there's no need to require them.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-03-11 21:37:30 Re: proposal: searching in array function - array_position
Previous Message Robert Haas 2015-03-11 21:32:35 Re: Precedence of standard comparison operators