Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjsGr-0006ou-Mq for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Sep 2016 18:17:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bjsGr-00067K-7r for pgsql-hackers@arkaria.postgresql.org; Tue, 13 Sep 2016 18:17:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bjsGq-00067E-OE for pgsql-hackers@postgresql.org; Tue, 13 Sep 2016 18:17:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bjsGo-0003we-6z for pgsql-hackers@postgresql.org; Tue, 13 Sep 2016 18:17:24 +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 u8DIHJIW022075; Tue, 13 Sep 2016 14:17:19 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@postgresql.org Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling) In-reply-to: <20160913180332.wlmxwp2pzdcj6v3j@alap3.anarazel.de> References: <20160523005327.v2tr7obytitxcnna@alap3.anarazel.de> <20160822214023.aaxz5l4igypowyri@alap3.anarazel.de> <20160827214829.zo2dfb5jaikii5nw@alap3.anarazel.de> <24639.1473782855@sss.pgh.pa.us> <20160913180332.wlmxwp2pzdcj6v3j@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 13 Sep 2016 11:03:32 -0700" Date: Tue, 13 Sep 2016 14:17:19 -0400 Message-ID: <22074.1473790639@sss.pgh.pa.us> X-Pg-Spam-Score: -4.2 (----) 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: > On 2016-09-13 12:07:35 -0400, Tom Lane wrote: >> /* >> - * Don't pull up a subquery that has any set-returning functions in its >> - * targetlist. Otherwise we might well wind up inserting set-returning >> - * functions into places where they mustn't go, such as quals of higher >> - * queries. This also ensures deletion of an empty jointree is valid. >> - */ >> - if (expression_returns_set((Node *) subquery->targetList)) >> - return false; > I don't quite understand parts of the comment you removed here. What > does "This also ensures deletion of an empty jointree is valid." mean? TBH, I don't remember what that was about anymore. Whatever it was might not apply now, anyway. If there was something to it, maybe we'll rediscover it while we're fooling with tSRFs, and then we can insert a less cryptic comment. > Looks good, except that you didn't adopt the hunk adjusting > src/backend/executor/README, which still seems to read: Ah, I missed that there was anything to change docs-wise. Will fix. Thanks for looking it over! 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