aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.c
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2015-12-21 10:34:14 -0500
committerStephen Frost <sfrost@snowman.net>2015-12-21 10:34:14 -0500
commit6f8cb1e23485bd6d45e8865760436e1a5ce65a6d (patch)
treef74b071ab712ac6e5fcea2f1561da4916887ec35 /contrib/postgres_fdw/postgres_fdw.c
parent99ccb2309263183f0f3d838b79f3e07ad8cc6a63 (diff)
downloadpostgresql-6f8cb1e23485bd6d45e8865760436e1a5ce65a6d.tar.gz
postgresql-6f8cb1e23485bd6d45e8865760436e1a5ce65a6d.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 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions