Re: Proposal : REINDEX xxx VERBOSE - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Proposal : REINDEX xxx VERBOSE
Date
Msg-id 54F90BDE.4090208@BlueTreble.com
Whole thread Raw
In response to Re: Proposal : REINDEX xxx VERBOSE  (Sawada Masahiko <sawada.mshk@gmail.com>)
Responses Re: Proposal : REINDEX xxx VERBOSE  (Sawada Masahiko <sawada.mshk@gmail.com>)
List pgsql-hackers
On 3/2/15 10:58 AM, Sawada Masahiko wrote:
> On Wed, Feb 25, 2015 at 4:58 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
>> On 2/24/15 8:28 AM, Sawada Masahiko wrote:
>>>>
>>>> According to the above discussion, VACUUM and REINDEX should have
>>>> trailing options. Tom seems (to me) suggesting that SQL-style
>>>> (bare word preceded by WITH) options and Jim suggesting '()'
>>>> style options? (Anyway VACUUM gets the*third additional*  option
>>>> sytle, but it is the different discussion from this)
>>
>>
>> Well, almost everything does a trailing WITH. We need to either stick with
>> that for consistency, or add leading () as an option to those WITH commands.
>>
>> Does anyone know why those are WITH? Is it ANSI?
>>
>> 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...

> We have discussed about this option including FORCE option, but I
> think there are not user who want to use both FORCE and VERBOSE option
> at same time.

I find that very hard to believe... I would expect a primary use case 
for VERBOSE to be "I ran REINDEX, but it doesn't seem to have done 
anything... what's going on?" and that's exactly when you might want to 
use FORCE.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Weirdly pesimistic estimates in optimizer
Next
From: Jim Nasby
Date:
Subject: Re: Configurable location for extension .control files