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

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

On Fri, 4 Aug 2006, Peter Eisentraut wrote:

> 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?

I asked this too. Tom pointed this out (I'd give the URL if I could find
it on archives):

--
You bet. VALUES is parallel to SELECT in the SQL grammar, so AFAICS
it should be legal anywhere you can write SELECT.

The basic productions in the spec's grammar are respectively

<query specification> ::=
SELECT [ <set quantifier> ] <select list>
<table expression>

and

<table value constructor> ::=
VALUES <row value expression list>
--

which seems to be the case from my reading of the spec.

Gavin

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2006-08-04 02:36:23 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Peter Eisentraut 2006-08-04 01:21:47 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Brown 2006-08-04 02:35:08 Re: [PATCHES] LWLock statistics collector
Previous Message Peter Eisentraut 2006-08-04 01:21:47 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]

Browse pgsql-patches by date

  From Date Subject
Next Message Kevin Brown 2006-08-04 02:35:08 Re: [PATCHES] LWLock statistics collector
Previous Message Peter Eisentraut 2006-08-04 01:21:47 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]