Fix pull_up_simple_union_all to copy all rtable entries from child subquery to
Heikki Linnakangas <heikki.linnakangas@iki.fi>
Fix pull_up_simple_union_all to copy all rtable entries from child subquery to parent, not only those with RangeTblRefs. We need them in ExecCheckRTPerms. Report by Brendan O'Shea. Back-patch to 8.2, where pull_up_simple_union_all was introduced.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/prep/prepjointree.c | modified | +38 −30 |
| src/backend/rewrite/rewriteManip.c | modified | +20 −1 |
| src/include/rewrite/rewriteManip.h | modified | +3 −1 |