aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2015-12-21 10:34:20 -0500
committerStephen Frost <sfrost@snowman.net>2015-12-21 10:34:20 -0500
commit496943ec2b6de0f22cd9e18f673e13635b5972ef (patch)
treecace174a6042ba44850e98beb69f33d61fde5c50 /src/backend/executor/nodeModifyTable.c
parent0c28e767c612c9e90ae8ab188cf9b21114a34ddc (diff)
downloadpostgresql-496943ec2b6de0f22cd9e18f673e13635b5972ef.tar.gz
postgresql-496943ec2b6de0f22cd9e18f673e13635b5972ef.zip
Make viewquery a copy in rewriteTargetView()
Rather than expect the Query returned by get_view_query() to be read-only and then copy bits and pieces of it out, simply copy the entire structure when we get it. This addresses an issue where AcquireRewriteLocks, which is called by acquireLocksOnSubLinks(), scribbles on the parsetree passed in, which was actually an entry in relcache, leading to segfaults with certain view definitions. This also future-proofs us a bit for anyone adding more code to this path. The acquireLocksOnSubLinks() was added in commit c3e0ddd40. Back-patch to 9.3 as that commit was.
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions