On 2/5/15 12:01 PM, Tom Lane wrote:
Robert Haas <robertmh...@gmail.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


--
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