model-writtenrun 7687 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane reported that pg_stat_get_subscription could return multiple rows but lacked the proretset catalog flag, causing direct SELECT-list calls to fail in #1.
- In #2, Tom explained that permissive function-in-FROM execution concealed the catalog error while misleading the planner, and proposed fixing both the declaration and executor protocol checks.
- The patch in #2 preserved the historical treatment of ExprEndResult from a non-set-returning function as NULL because PL/Perl relied on it.
- Tom committed the catalog portion of #2 unchanged, with an additional catalog-version bump, as fed10d4eec; its commit message explains that backpatching the catalog fix was impractical.
- Tom then committed the unchanged executor portion of #2 as d4545dc19b, completing the submitted patch; the stricter checks were not backpatched to avoid breaking third-party functions in minor releases, and the thread contains no independent review.