postgresql/src
Stephen Frost 6f8cb1e234 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.
2015-12-21 10:34:14 -05:00
..
backend Make viewquery a copy in rewriteTargetView() 2015-12-21 10:34:14 -05:00
bin Remove silly completion for "DELETE FROM tabname ...". 2015-12-20 18:29:51 -05:00
common
include Revert 9246af6799 because 2015-12-18 21:35:22 +03:00
interfaces Fix out-of-memory error handling in ParameterDescription message processing. 2015-12-14 18:19:10 +02:00
makefiles
pl Instruct Coverity using an assertion. 2015-12-05 03:04:17 -05:00
port Adopt the GNU convention for handling tar-archive members exceeding 8GB. 2015-11-21 20:21:31 -05:00
template
test Make viewquery a copy in rewriteTargetView() 2015-12-21 10:34:14 -05:00
timezone
tools Use just one standalone-backend session for initdb's post-bootstrap steps. 2015-12-17 19:38:21 -05:00
tutorial
.gitignore
bcc32.mak
DEVELOPERS
Makefile
Makefile.global.in
Makefile.shlib
nls-global.mk
win32.mak