Rationalize expression context reset in ExecModifyTable(). The current pattern of reseting expressions both in ExecProcessReturning() and ExecOnConflictUpdate() makes it harder than necessary to reason about memory lifetimes. It also requires materializing slots unnecessarily, although this patch doesn't take advantage of the fact that that's not necessary anymore.
Instead reset the expression context once for each input tuple. Author: Ashutosh Bapat Discussion: https://postgr.es/m/[email protected] Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c058fc2a2b8ea25015b211186c88a6a3006f5937 Modified Files -------------- src/backend/executor/nodeModifyTable.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-)
