Re: Proposal : REINDEX xxx VERBOSE

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Proposal : REINDEX xxx VERBOSE
Дата
Msg-id CA+TgmoYagUHzwTqTdpqKajQmOUY_9Ld6Wc6VqpC-+=-WdvS-5g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal : REINDEX xxx VERBOSE  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Proposal : REINDEX xxx VERBOSE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Feb 4, 2015 at 8:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> writes:
>> The phrase "{INDEX | TABLE |..} name" seems to me indivisible as
>> target specification. IMHO, the options for VACUUM and so is
>> placed *just after* command name, not *before* the target.
>
>> If this is right, the syntax would be like this.
>
>> REINDEX [ (option [, option ...] ) ] {INDEX | TABLE | etc } name
>
>> What do you think about this?
>
> I think this is wrong and ugly.  INDEX etc are part of the command name.

I don't think so.  I think they're part of the target.  We have one
manual page is for REINDEX, not five separate reference pages for
REINDEX INDEX, REINDEX TABLE, REINDEX SCHEMA, REINDEX DATABASE, and
REINDEX SYSTEM.  If we really wanted to, we could probably even
support this:

REINDEX INDEX foo, TABLE bar, TABLE baz;

We've got a mix of styles for extensible options right now:

EXPLAIN [ ( option [, ...] ) ] statement
COPY table_name [ ( column_name [, ...] ) ]   FROM { 'filename' | PROGRAM 'command' | STDIN }   [ [ WITH ] ( option [,
...]) ]
 
VACUUM [ ( { FULL | FREEZE | VERBOSE | ANALYZE } [, ...] ) ] [
table_name [ (column_name [, ...] ) ] ]

So COPY puts the options at the very end, but EXPLAIN and VACUUM put
them right after the command name.  I prefer the latter style and
would vote to adopt it here.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: David G Johnston
Дата:
Сообщение: Re: GRANT USAGE on FOREIGN SERVER exposes passwords
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Proposal : REINDEX xxx VERBOSE