diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-10-10 01:43:50 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-10-10 01:43:50 +0000 |
commit | 8a5849b7ff24c637a1140c26fc171e45c9142005 (patch) | |
tree | 8f660c08709c999c3a4299436312390c53231b01 /src/backend/executor/execProcnode.c | |
parent | b865d2758255b767e30dc5f23c7c7d209e716f3b (diff) | |
download | postgresql-8a5849b7ff24c637a1140c26fc171e45c9142005.tar.gz postgresql-8a5849b7ff24c637a1140c26fc171e45c9142005.zip |
Split the processing of INSERT/UPDATE/DELETE operations out of execMain.c.
They are now handled by a new plan node type called ModifyTable, which is
placed at the top of the plan tree. In itself this change doesn't do much,
except perhaps make the handling of RETURNING lists and inherited UPDATEs a
tad less klugy. But it is necessary preparation for the intended extension of
allowing RETURNING queries inside WITH.
Marko Tiikkaja
Diffstat (limited to 'src/backend/executor/execProcnode.c')
-rw-r--r-- | src/backend/executor/execProcnode.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c index 1b06ff823f8..5339a57b4f0 100644 --- a/src/backend/executor/execProcnode.c +++ b/src/backend/executor/execProcnode.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.66 2009/09/27 21:10:53 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/execProcnode.c,v 1.67 2009/10/10 01:43:47 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -93,6 +93,7 @@ #include "executor/nodeLimit.h" #include "executor/nodeMaterial.h" #include "executor/nodeMergejoin.h" +#include "executor/nodeModifyTable.h" #include "executor/nodeNestloop.h" #include "executor/nodeRecursiveunion.h" #include "executor/nodeResult.h" @@ -146,6 +147,11 @@ ExecInitNode(Plan *node, EState *estate, int eflags) estate, eflags); break; + case T_ModifyTable: + result = (PlanState *) ExecInitModifyTable((ModifyTable *) node, + estate, eflags); + break; + case T_Append: result = (PlanState *) ExecInitAppend((Append *) node, estate, eflags); @@ -343,6 +349,10 @@ ExecProcNode(PlanState *node) result = ExecResult((ResultState *) node); break; + case T_ModifyTableState: + result = ExecModifyTable((ModifyTableState *) node); + break; + case T_AppendState: result = ExecAppend((AppendState *) node); break; @@ -524,7 +534,7 @@ MultiExecProcNode(PlanState *node) * Recursively cleans up all the nodes in the plan rooted * at 'node'. * - * After this operation, the query plan will not be able to + * After this operation, the query plan will not be able to be * processed any further. This should be called only after * the query plan has been fully executed. * ---------------------------------------------------------------- @@ -553,6 +563,10 @@ ExecEndNode(PlanState *node) ExecEndResult((ResultState *) node); break; + case T_ModifyTableState: + ExecEndModifyTable((ModifyTableState *) node); + break; + case T_AppendState: ExecEndAppend((AppendState *) node); break; |