mirror of
https://github.com/postgres/postgres.git
synced 2025-08-25 20:23:07 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user