Fix pull_up_simple_union_all to copy all rtable entries from child subquery to
authorHeikki Linnakangas <[email protected]>
Thu, 14 Aug 2008 20:32:11 +0000 (20:32 +0000)
committerHeikki Linnakangas <[email protected]>
Thu, 14 Aug 2008 20:32:11 +0000 (20:32 +0000)
commit4a4b4267b9d46ec11b6aeab02f42bf533f2f9bec
treec18e4e37d6d0f5f14d26c89a0d8c50a4f4268404
parenta4ab1b8f324ab56d33bd234af54bcf63ac992357
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.
src/backend/optimizer/prep/prepjointree.c
src/backend/rewrite/rewriteManip.c
src/include/rewrite/rewriteManip.h