pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Fetter <david@fetter.org>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-hackers@postgresql.org, Gavin Sherry <swm@linuxworld.com.au>
Cc: Michael Glaesemann <grzm@seespotcode.net>
Cc: Joe Conway <mail@joeconway.com>
Cc: pgsql-patches@postgresql.org
Cc: pgsql-docs@postgresql.org
Subject: Re: [HACKERS] [PATCHES] Values list-of-targetlists patch for comments (was Re:
Date: Wed, 09 Aug 2006 13:07:30 -0400
Message-ID: <27400.1155143250@sss.pgh.pa.us> (raw)
In-Reply-To: <20060809162242.GA19092@fetter.org>
References: <44B69778.5050104@dunslane.net>
	<Pine.LNX.4.58.0608041040550.16622@linuxworld.com.au>
	<969.1154659817@sss.pgh.pa.us>
	<200608091505.04383.peter_e@gmx.net>
	<20060809162242.GA19092@fetter.org>

David Fetter <david@fetter.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



view thread (61+ messages)  latest in thread

Message-ID: <27400.1155143250@sss.pgh.pa.us>
Permalink:  ../27400.1155143250@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27400.1155143250@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david@fetter.org, peter_e@gmx.net, swm@linuxworld.com.au, grzm@seespotcode.net, mail@joeconway.com, pgsql-patches@postgresql.org
  Subject: Re: [HACKERS] [PATCHES] Values list-of-targetlists patch for comments (was Re:
  In-Reply-To: <27400.1155143250@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox