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

From Tom Lane
Subject Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Date
Msg-id 860.1154658983@sss.pgh.pa.us
Whole thread Raw
In response to Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-docs
Peter Eisentraut <peter_e@gmx.net> writes:
> Gavin Sherry wrote:
>> What do we want to do about documenting:
>> regression=# values(1);

> Out of curiosity, according to what theory should that be allowed?

Wrong question.  SELECT (for the general case of multi-row results)
and VALUES are exactly parallel in the SQL grammar; the right question
is "according to what theory are you allowed to issue a general SELECT?"

AFAICT the SQL spec only envisions "SELECT ... INTO some-variables",
restricted to a single-row result (cf <select statement: single row>
production) as being something a client can issue directly.  Every more-
complex case is apparently supposed to be handled by one-row-at-a-time
fetches from a cursor.

If you can persuade the community that they don't want SELECT in its
current form, you might be able to persuade me that VALUES shouldn't
be allowed either.

            regards, tom lane

pgsql-docs by date:

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