Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTYM4-0001QW-3M for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jan 2017 18:19:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cTYM2-00044V-Uc for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Jan 2017 18:19:34 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTYKe-0002WU-Li for pgsql-hackers@postgresql.org; Tue, 17 Jan 2017 18:18:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cTYKb-0008FH-G4 for pgsql-hackers@postgresql.org; Tue, 17 Jan 2017 18:18:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v0HII2vS030269; Tue, 17 Jan 2017 13:18:02 -0500 From: Tom Lane To: Andres Freund cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling) In-reply-to: <20170117180324.dqgz23xaf6wtazb4@alap3.anarazel.de> References: <20160912231144.f3nseocp274iq7wg@alap3.anarazel.de> <23413.1473723322@sss.pgh.pa.us> <20160912234630.caueobrrbg5vse5y@alap3.anarazel.de> <557.1473895705@sss.pgh.pa.us> <20161031160639.nyxoktszi5psl2cc@alap3.anarazel.de> <20170116032952.z2re55hcfhzbkmrm@alap3.anarazel.de> <20170116083316.2izqrxbvmyalazac@alap3.anarazel.de> <21924.1484593998@sss.pgh.pa.us> <29207.1484675540@sss.pgh.pa.us> <20170117180324.dqgz23xaf6wtazb4@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 17 Jan 2017 10:03:24 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30267.1484677082.1@sss.pgh.pa.us> Date: Tue, 17 Jan 2017 13:18:02 -0500 Message-ID: <30268.1484677082@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andres Freund writes: > I'd not have gone for SetResult if we didn't already have Result. I'm > not super happy ending up having Project in ProjectSet but not in the > Result that end up doing the majority of the projection. But eh, we can > live with it. Using Result for two completely different things is a wart though. If we had it to do over I think we'd define Result as a scan node that produces rows from no input, and create a separate Project node for the case of projecting from input tuples. People are used to seeing Result in EXPLAIN output, so it's not worth the trouble of changing that IMO, but we don't have to use it as a model for more node types. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers