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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: Michael Glaesemann <grzm(at)seespotcode(dot)net>, Joe Conway <mail(at)joeconway(dot)com>, pgsql-patches(at)postgresql(dot)org, pgsql-docs(at)postgresql(dot)org
Subject: Re: [PATCHES] Values list-of-targetlists patch for comments (was Re:
Date: 2006-08-04 02:50:17
Message-ID: 969.1154659817@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers pgsql-patches

Gavin Sherry <swm(at)linuxworld(dot)com(dot)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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Joe Conway 2006-08-04 04:27:16 Re: VALUES clause memory optimization
Previous Message Tom Lane 2006-08-04 02:36:23 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-08-04 03:45:18 New ecpg warnings
Previous Message Tom Lane 2006-08-04 02:36:23 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2006-08-04 04:27:16 Re: VALUES clause memory optimization
Previous Message Tom Lane 2006-08-04 02:36:23 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]