X-Original-To: pgsql-docs-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7DC939FB29F; Wed, 9 Aug 2006 13:22:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 67076-01; Wed, 9 Aug 2006 13:22:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from fetter.org (start.fetter.org [66.92.188.65]) by postgresql.org (Postfix) with ESMTP id 229D29FB29E; Wed, 9 Aug 2006 13:22:44 -0300 (ADT) Received: by fetter.org (Postfix, from userid 500) id CD271F3D008; Wed, 9 Aug 2006 09:22:42 -0700 (PDT) Date: Wed, 9 Aug 2006 09:22:42 -0700 From: David Fetter To: Peter Eisentraut Cc: pgsql-hackers@postgresql.org, Tom Lane , Gavin Sherry , Michael Glaesemann , Joe Conway , pgsql-patches@postgresql.org, pgsql-docs@postgresql.org Subject: Re: [HACKERS] [PATCHES] Values list-of-targetlists patch for comments (was Re: Message-ID: <20060809162242.GA19092@fetter.org> References: <44B69778.5050104@dunslane.net> <969.1154659817@sss.pgh.pa.us> <200608091505.04383.peter_e@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200608091505.04383.peter_e@gmx.net> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.073 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/17 X-Sequence-Number: 3635 On Wed, Aug 09, 2006 at 03:05:02PM +0200, Peter Eisentraut wrote: > Am Freitag, 4. August 2006 04:50 schrieb Tom Lane: > > I'd like to see us refactor the docs as necessary to reflect that > > idea. Peter is right that this needs some discussion in > > syntax.sgml as well as in the reference pages --- but I'm still > > not very clear on how the presentation should go. > > I'm beginning to think that VALUES might be a separate command after > all. What's below definitely bolsters that idea :) postgres=# VALUES(1); column1 --------- 1 (1 row) However, there are some oddities: postgres=# SELECT * FROM (VALUES (1,2)) AS foo(bar,baz); bar | baz -----+----- 1 | 2 (1 row) postgres=# (VALUES (1,2)) AS foo(bar,baz); ERROR: syntax error at or near "AS" LINE 1: (VALUES (1,2)) AS foo(bar,baz); Does the SQL standard have anything to say about assigning identifiers both to the entire VALUES() statement and to its columns when the VALUES() statement is by itself? Cheers, D -- David Fetter http://fetter.org/ phone: +1 415 235 3778 AIM: dfetter666 Skype: davidfetter Remember to vote!