Fix pull_up_simple_union_all to copy all rtable entries from child subquery to
authorHeikki Linnakangas <heikki@enterprisedb.com>
Thu, 14 Aug 2008 20:31:59 +0000 (20:31 +0000)
committerHeikki Linnakangas <heikki@enterprisedb.com>
Thu, 14 Aug 2008 20:31:59 +0000 (20:31 +0000)
commitee72e6150f6152cf7f55092681126c492acf262c
tree0e2b631b77c70ec12a09a067725ad38ea492d685
parentc5d1fab8a144d8cb8a6dae1deca8bbb36fd056e7
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