Skip site navigation (1) Skip section navigation (2)

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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, Michael Glaesemann <grzm(at)seespotcode(dot)net>, Joe Conway <mail(at)joeconway(dot)com>, pgsql-patches(at)postgresql(dot)org, pgsql-docs(at)postgresql(dot)org
Subject: Re: [HACKERS] [PATCHES] Values list-of-targetlists patch for comments (was Re:
Date: 2006-08-09 17:07:30
Message-ID: 27400.1155143250@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-docspgsql-hackerspgsql-patches
David Fetter <david(at)fetter(dot)org> writes:
> However, there are some oddities:
> postgres=# SELECT * FROM (VALUES (1,2)) AS foo(bar,baz);
> [ works ]
> postgres=# (VALUES (1,2)) AS foo(bar,baz);
> ERROR:  syntax error at or near "AS"

This is per spec.  Effectively, AS is part of the FROM-clause syntax
not part of a standalone command.  You can't write this either:

regression=# (select 1,2) as foo(bar,baz);
ERROR:  syntax error at or near "as"
LINE 1: (select 1,2) as foo(bar,baz);
                     ^

			regards, tom lane

In response to

pgsql-docs by date

Next:From: Jim NasbyDate: 2006-08-09 20:29:04
Subject: Cross-referencing
Previous:From: David FetterDate: 2006-08-09 16:22:42
Subject: Re: [HACKERS] [PATCHES] Values list-of-targetlists patch for comments (was Re:

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2006-08-09 17:15:13
Subject: Re: proposal for PL packages for 8.3.
Previous:From: Joshua D. DrakeDate: 2006-08-09 17:03:57
Subject: Re: 8.2 features status

pgsql-patches by date

Next:From: Andreas PflugDate: 2006-08-09 17:28:07
Subject: remote query debugging was: Plugins redux
Previous:From: Tom LaneDate: 2006-08-09 16:44:00
Subject: Plugins redux (was Re: [PATCHES] PL instrumentation plugin support)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group