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

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

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2006-08-04 02:50:17 Re: [PATCHES] Values list-of-targetlists patch for comments (was Re:
Previous Message Gavin Sherry 2006-08-04 01:57:48 Re: Values list-of-targetlists patch for comments (was Re:

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-04 02:50:17 Re: [PATCHES] Values list-of-targetlists patch for comments (was Re:
Previous Message Kevin Brown 2006-08-04 02:35:08 Re: [PATCHES] LWLock statistics collector

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2006-08-04 02:50:17 Re: [PATCHES] Values list-of-targetlists patch for comments (was Re:
Previous Message Kevin Brown 2006-08-04 02:35:08 Re: [PATCHES] LWLock statistics collector