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

From Gavin Sherry
Subject Re: Values list-of-targetlists patch for comments (was Re:
Date
Msg-id Pine.LNX.4.58.0608041143430.17044@linuxworld.com.au
Whole thread Raw
In response to Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-docs
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

pgsql-docs by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: Values list-of-targetlists patch for comments (was Re:
Next
From: "Pavel Stehule"
Date:
Subject: Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]