Avoid scribbling on input node tree in CREATE/ALTER DOMAIN. This works fine in the "simple Query" code path; but if the statement is in the plan cache then it's corrupted for future re-execution. Apply copyObject() to protect the original tree from modification, as we've done elsewhere.
This narrow fix is applied only to the back branches. In HEAD, the problem was fixed more generally by commit 7c337b6b5; but that changed ProcessUtility's API, so it's infeasible to back-patch. Per bug #17053 from Charles Samborski. Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected] Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f172438ef6ff7fa374edeaee423241410c97566c Modified Files -------------- src/backend/commands/typecmds.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
