X-Original-To: pgsql-patches-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5BD839FA69A for ; Mon, 24 Jul 2006 18:22:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 70178-01 for ; Mon, 24 Jul 2006 21:22:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from joeconway.com (joeconway.com [68.15.9.201]) by postgresql.org (Postfix) with ESMTP id 564E19FA666 for ; Mon, 24 Jul 2006 18:22:31 -0300 (ADT) Received: from [206.190.70.130] (account jconway HELO [172.16.1.115]) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 4091353; Mon, 24 Jul 2006 14:22:29 -0700 Message-ID: <44C53A15.9030509@joeconway.com> Date: Mon, 24 Jul 2006 14:22:29 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc5 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane CC: Christopher Kings-Lynne , "Patches (PostgreSQL)" , Andrew Dunstan , Bernd Helmle , Peter Eisentraut , Susanne Ebrecht Subject: Re: Values list-of-targetlists patch for comments (was Re: References: <44B69778.5050104@dunslane.net> <50461.84.63.113.55.1152832991.squirrel@pezone.net> <44B7ADFC.90205@dunslane.net> <44BC0432.3040509@joeconway.com> <44BC661F.80609@joeconway.com> <44BCD06C.3060409@calorieking.com> <44BCF1D4.3010807@dunslane.net> <5842.1153246741@sss.pgh.pa.us> <44BD8854.9060506@calorieking.com> <15212.1153279954@sss.pgh.pa.us> <44BDB2F5.7080003@joeconway.com> <44BEA710.6060700@joeconway.com> <23198.1153367887@sss.pgh.pa.us> <44BF0382.2010501@joeconway.com> <23454.1153370214@sss.pgh.pa.us> <44BF122F.1080200@joeconway.com> <23927.1153373971@sss.pgh.pa.us> <44C00E1E.1000405@joeconway.com> <14047.1153442773@sss.pgh.pa.us> <44C4451A.4010906@joeconway.com> <11495.1153757531@sss.pgh.pa.us> <44C4F625.2050304@joeconway.com> <12029.1153760969@sss.pgh.pa.us> In-Reply-To: <12029.1153760969@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/194 X-Sequence-Number: 20348 Tom Lane wrote: > ISTM that this should be represented using an RTE_SUBQUERY node in the > outer query; the alias attaches to that node, not to the VALUES itself. > So I don't think you need that alias field in the jointree entry either. > > If we stick with the plan of representing VALUES as if it were SELECT * > FROM (valuesnode), then this approach would make the second query above > have a structure like > > Query > .rtable -> RTE_SUBQUERY > .subquery -> Query > .jointree -> Values > > (leaving out a ton of detail of course, but those are the key nodes). > OK, I'll go try to wrap my mind around that this evening and see where it takes me. Thanks, Joe