From 56ee2ecba96a742bb6e18dfe8ee48054e90ebaa9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 26 Feb 2002 22:47:12 +0000 Subject: Restructure command-completion-report code so that there is just one report for each received SQL command, regardless of rewriting activity. Also ensure that this report comes from the 'original' command, not the last command generated by rewrite; this fixes 7.2 breakage for INSERT commands that have actions added by rules. Fernando Nasser and Tom Lane. --- src/backend/executor/functions.c | 4 ++-- src/backend/executor/spi.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/backend/executor') diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 7f73cdd26a9..c38b8077f52 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.47 2001/10/28 06:25:43 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.48 2002/02/26 22:47:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -275,7 +275,7 @@ postquel_getnext(execution_state *es) /* * Process a utility command. (create, destroy...) DZ - 30-8-1996 */ - ProcessUtility(es->qd->parsetree->utilityStmt, es->qd->dest); + ProcessUtility(es->qd->parsetree->utilityStmt, es->qd->dest, NULL); if (!LAST_POSTQUEL_COMMAND(es)) CommandCounterIncrement(); return (TupleTableSlot *) NULL; diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index b9ab6422658..05044d6cd39 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.65 2002/02/14 15:24:08 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.66 2002/02/26 22:47:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1011,7 +1011,7 @@ _SPI_execute(char *src, int tcount, _SPI_plan *plan) res = SPI_OK_UTILITY; if (plan == NULL) { - ProcessUtility(queryTree->utilityStmt, None); + ProcessUtility(queryTree->utilityStmt, None, NULL); if (!islastquery) CommandCounterIncrement(); else @@ -1085,7 +1085,7 @@ _SPI_execute_plan(_SPI_plan *plan, Datum *Values, char *Nulls, int tcount) if (queryTree->commandType == CMD_UTILITY) { - ProcessUtility(queryTree->utilityStmt, None); + ProcessUtility(queryTree->utilityStmt, None, NULL); if (!islastquery) CommandCounterIncrement(); else -- cgit v1.2.3