Re: Proposal : REINDEX xxx VERBOSE

Поиск
Список
Период
Сортировка
От Sawada Masahiko
Тема Re: Proposal : REINDEX xxx VERBOSE
Дата
Msg-id CAD21AoBxPCpPvKQmvJMUh+p=2pfAu03gKJQ2R2zY47XHsH205Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal : REINDEX xxx VERBOSE  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: Proposal : REINDEX xxx VERBOSE  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Список pgsql-hackers
On Thu, Mar 12, 2015 at 6:36 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> 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.
>

I understood what your point is.
Attached patch is changed syntax, it does not have parenthesis.

Regards,

-------
Sawada Masahiko

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [PATCH] Add transforms feature
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: alter user/role CURRENT_USER