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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] Values list-of-targetlists patch for comments (was Re:
Дата
Msg-id 969.1154659817@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] [PATCHES] Values list-of-targetlists patch for comments (was Re:  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]