aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-10-14 23:49:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-10-14 23:49:20 +0000
commit9ff695c944e7a60792f38302076826eaf54d4031 (patch)
tree6e8cc2f7a857b9cc05e6c7101b3e4d178d8afa2b /src/include/executor
parentba0edcf451b992d064f311337bea2ddfbe7333db (diff)
downloadpostgresql-9ff695c944e7a60792f38302076826eaf54d4031.tar.gz
postgresql-9ff695c944e7a60792f38302076826eaf54d4031.zip
Make SPI's execution of querystrings follow the rules agreed to for
command status at the interactive level. SPI_processed, etc are set in the same way as the returned command status would have been set if the same querystring were issued interactively. Per gripe from Michael Paesold 25-Sep-02.
Diffstat (limited to 'src/include/executor')
-rw-r--r--src/include/executor/spi_priv.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/include/executor/spi_priv.h b/src/include/executor/spi_priv.h
index c780c3656fa..6a2acd7b21c 100644
--- a/src/include/executor/spi_priv.h
+++ b/src/include/executor/spi_priv.h
@@ -1,9 +1,12 @@
/*-------------------------------------------------------------------------
*
- * spi.c
+ * spi_priv.h
* Server Programming Interface private declarations
*
- * $Header: /cvsroot/pgsql/src/include/executor/spi_priv.h,v 1.12 2002/05/21 22:05:55 tgl Exp $
+ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * $Id: spi_priv.h,v 1.13 2002/10/14 23:49:20 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -12,9 +15,9 @@
#include "executor/spi.h"
+
typedef struct
{
- List *qtlist;
uint32 processed; /* by Executor */
SPITupleTable *tuptable;
MemoryContext procCxt; /* procedure context */
@@ -24,13 +27,20 @@ typedef struct
typedef struct
{
+ /* context containing _SPI_plan itself as well as subsidiary structures */
MemoryContext plancxt;
+ /* List of List of querytrees; one sublist per original parsetree */
List *qtlist;
+ /* List of plan trees --- length == # of querytrees, but flat list */
List *ptlist;
+ /* Argument types, if a prepared plan */
int nargs;
Oid *argtypes;
+ /* Command type of last original parsetree */
+ CmdType origCmdType;
} _SPI_plan;
+
#define _SPI_CPLAN_CURCXT 0
#define _SPI_CPLAN_PROCXT 1
#define _SPI_CPLAN_TOPCXT 2