Re: Proposal : REINDEX xxx VERBOSE

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal : REINDEX xxx VERBOSE
Date: 2015-02-11 20:34:17
Message-ID: 54DBBCC9.1020206@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/5/15 12:01 PM, Tom Lane wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> We've got a mix of styles for extensible options right now:
>
> That we do.
>
>> 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.
>
> Meh. Options-at-the-end seems by far the most sensible style to me.
> The options-right-after-the-keyword style is a mess, both logically
> and from a parsing standpoint, and the only reason we have it at all
> is historical artifact (ask Bruce about the origins of VACUUM ANALYZE
> over a beer sometime).

I suspect at least some of this stems from how command line programs
tend to process options before arguments. I tend to agree with you Tom,
but I think what's more important is that we're consistent. COPY is
already a bit of an oddball because it uses WITH, but both EXPLAIN and
VACUUM use parenthesis immediately after the first verb. Introducing a
parenthesis version that goes at the end instead of the beginning is
just going to make this worse.

If we're going to take a stand on this, we need to do it NOW, before we
have even more commands that use ().

I know you were worried about accepting options anywhere because it
leads to reserved words, but perhaps we could support it just for
EXPLAIN and VACUUM, and then switch to trailing options if people think
that would be better.
--
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 Jim Nasby 2015-02-11 20:44:56 Re: relid of non user created tables
Previous Message Heikki Linnakangas 2015-02-11 20:25:53 Re: reducing our reliance on MD5