aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-01-21 11:02:40 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-01-21 11:02:40 +0000
commit94136d5a18403445cd60ae6beb470f6ebecca8b3 (patch)
tree96999d4189dbaf14033fa70cad6cf9d0ae904904 /src/include/executor
parent0154345078fb96a8bbe8b8785628400b17e5a75b (diff)
downloadpostgresql-94136d5a18403445cd60ae6beb470f6ebecca8b3.tar.gz
postgresql-94136d5a18403445cd60ae6beb470f6ebecca8b3.zip
Add new SPI_OK_REWRITTEN return code to SPI_execute and friends, for the
case that the command is rewritten into another type of command. The old behavior to return the command tag of the last executed command was pretty surprising. In PL/pgSQL, for example, it meant that if a command was rewritten to a utility statement, FOUND wasn't set at all.
Diffstat (limited to 'src/include/executor')
-rw-r--r--src/include/executor/spi.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h
index 66a77ce4778..8b9fe32d7ba 100644
--- a/src/include/executor/spi.h
+++ b/src/include/executor/spi.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.70 2009/01/07 20:38:56 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.71 2009/01/21 11:02:40 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -56,6 +56,7 @@ typedef struct _SPI_plan *SPIPlanPtr;
#define SPI_OK_INSERT_RETURNING 11
#define SPI_OK_DELETE_RETURNING 12
#define SPI_OK_UPDATE_RETURNING 13
+#define SPI_OK_REWRITTEN 14
extern PGDLLIMPORT uint32 SPI_processed;
extern PGDLLIMPORT Oid SPI_lastoid;