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


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to