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 (
To make changes to your subscription:

Reply via email to