aboutsummaryrefslogtreecommitdiff
path: root/contrib/intarray/_int_gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-06-13 15:58:37 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-06-13 15:58:37 -0400
commitd1423c52e3f00a7d00c4e3517fab0ed9b9330e3a (patch)
tree3a603649380726a2dfb0c6ba804e7c0269181b14 /contrib/intarray/_int_gist.c
parent5eaa05f637179b6847f9efc98ca07a9aa1479e47 (diff)
downloadpostgresql-d1423c52e3f00a7d00c4e3517fab0ed9b9330e3a.tar.gz
postgresql-d1423c52e3f00a7d00c4e3517fab0ed9b9330e3a.zip
Correctly update hasSubLinks while mutating a rule action.
rewriteRuleAction neglected to check for SubLink nodes in the securityQuals of range table entries. This could lead to failing to convert such a SubLink to a SubPlan, resulting in assertion crashes or weird errors later in planning. In passing, fix some poor coding in rewriteTargetView: we should not pass the source parsetree's hasSubLinks field to ReplaceVarsFromTargetList's outer_hasSubLinks. ReplaceVarsFromTargetList knows enough to ignore that when a Query node is passed, but it's still confusing and bad precedent: if we did try to update that flag we'd be updating a stale copy of the parsetree. Per bug #17972 from Alexander Lakhin. This has been broken since we added RangeTblEntry.securityQuals (although the presented test case only fails back to 215b43cdc), so back-patch all the way. Discussion: https://postgr.es/m/17972-f422c094237847d0@postgresql.org
Diffstat (limited to 'contrib/intarray/_int_gist.c')
0 files changed, 0 insertions, 0 deletions