Обсуждение: pgsql: Rationalize expression context reset in ExecModifyTable().

Поиск
Список
Период
Сортировка

pgsql: Rationalize expression context reset in ExecModifyTable().

От
Andres Freund
Дата:
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/20181105210039.hh4vvi4vwoq5ba2q@alap3.anarazel.de

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(-)