pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
Date: Tue, 13 Sep 2016 14:17:19 -0400
Message-ID: <22074.1473790639@sss.pgh.pa.us> (raw)
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andres Freund <andres@anarazel.de> 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



view thread (110+ messages)  latest in thread

Message-ID: <22074.1473790639@sss.pgh.pa.us>
Permalink:  ../22074.1473790639@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22074.1473790639@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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de
  Subject: Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
  In-Reply-To: <22074.1473790639@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