]> granicus.if.org Git - postgresql/commit
Fix add_rte_to_flat_rtable() for recent feature additions.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 Jul 2015 00:03:58 +0000 (20:03 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 22 Jul 2015 00:03:58 +0000 (20:03 -0400)
commitb6e7780346bae5fe07bd4631d355e692e1a8d006
treea93df9ade47bb73a9832dfa728a3196c6a15ade3
parent49c30004073fdb90800054cd1d13e5ab441f6283
Fix add_rte_to_flat_rtable() for recent feature additions.

The TABLESAMPLE and row security patches each overlooked this function,
though their errors of omission were opposite: RLS failed to zero out the
securityQuals field, leading to wasteful copying of useless expression
trees in finished plans, while TABLESAMPLE neglected to add a comment
saying that it intentionally *isn't* deleting the tablesample subtree.
There probably should be a similar comment about ctename, too.

Back-patch as appropriate.
src/backend/optimizer/plan/setrefs.c