Re: [PATCHES] Values list-of-targetlists patch for comments (was Re: - Mailing list pgsql-docs

From Tom Lane
Subject Re: [PATCHES] Values list-of-targetlists patch for comments (was Re:
Date
Msg-id 969.1154659817@sss.pgh.pa.us
Whole thread Raw
In response to Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] [PATCHES] Values list-of-targetlists patch for comments (was Re:
List pgsql-docs
Gavin Sherry <swm@linuxworld.com.au> writes:
> On Fri, 4 Aug 2006, Michael Glaesemann wrote:
>> On Aug 3, 2006, at 23:58 , Tom Lane wrote:
>>> Should we give VALUES its own reference page?  That doesn't quite
>>> seem helpful either.
>>
>> I think we should go for a separate reference page, as VALUES appears
>> to be expanding quite a bit.

> ... with update? I associate it very closely with INSERT. After all,
> INSERT is the only statement where we've had VALUES as part of the
> grammar.

True, but I think that's just a historical artifact.  If you look at the
SQL spec, INSERT ... VALUES and INSERT ... SELECT are not distinct
constructs: they fall out of the fact that VALUES and SELECT are allowed
interchangeably.

         <insert statement> ::=
              INSERT INTO <table name>
                <insert columns and source>

         <insert columns and source> ::=
                [ <left paren> <insert column list> <right paren> ]
              <query expression>
              | DEFAULT VALUES

         <insert column list> ::= <column name list>

and when you trace down <query expression> you find the SELECT
and VALUES options entering at exactly the same place ...

I'd like to see us refactor the docs as necessary to reflect that idea.
Peter is right that this needs some discussion in syntax.sgml as well as
in the reference pages --- but I'm still not very clear on how the
presentation should go.

            regards, tom lane

pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Next
From: Peter Eisentraut
Date:
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]