aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor/nodeModifyTable.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2020-02-17 15:19:58 +0100
committerPeter Eisentraut <peter@eisentraut.org>2020-02-17 15:20:58 +0100
commitc6679e4fca21d253ced84c51ac1a31c1b2aec72f (patch)
treeaf48ab74e7d45752731f72081c303ca98aa969cc /src/include/executor/nodeModifyTable.h
parentad3ae64770e5b4391ad07fb2a689d72aa45b4689 (diff)
downloadpostgresql-c6679e4fca21d253ced84c51ac1a31c1b2aec72f.tar.gz
postgresql-c6679e4fca21d253ced84c51ac1a31c1b2aec72f.zip
Optimize update of tables with generated columns
When updating a table row with generated columns, only recompute those generated columns whose base columns have changed in this update and keep the rest unchanged. This can result in a significant performance benefit. The required information was already kept in RangeTblEntry.extraUpdatedCols; we just have to make use of it. Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/b05e781a-fa16-6b52-6738-761181204567@2ndquadrant.com
Diffstat (limited to 'src/include/executor/nodeModifyTable.h')
-rw-r--r--src/include/executor/nodeModifyTable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/executor/nodeModifyTable.h b/src/include/executor/nodeModifyTable.h
index 0495cae051c..4ec4ebdabc1 100644
--- a/src/include/executor/nodeModifyTable.h
+++ b/src/include/executor/nodeModifyTable.h
@@ -15,7 +15,7 @@
#include "nodes/execnodes.h"
-extern void ExecComputeStoredGenerated(EState *estate, TupleTableSlot *slot);
+extern void ExecComputeStoredGenerated(EState *estate, TupleTableSlot *slot, CmdType cmdtype);
extern ModifyTableState *ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags);
extern void ExecEndModifyTable(ModifyTableState *node);