Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
Дата
Msg-id 22074.1473790639@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)  (Andres Freund <andres@anarazel.de>)
Список pgsql-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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Borodin
Дата:
Сообщение: Re: GiST penalty functions [PoC]
Следующее
От: Victor Wagner
Дата:
Сообщение: Inheriting PostgresNode object