diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/executor/spi.h | 2 | ||||
-rw-r--r-- | src/include/executor/spi_priv.h | 38 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index 72b6fe0f1fa..cc0ac6c4b7d 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -72,6 +72,8 @@ extern int SPI_result; extern int SPI_connect(void); extern int SPI_finish(void); +extern void SPI_push(void); +extern void SPI_pop(void); extern int SPI_exec(char *src, int tcount); extern int SPI_execp(void *plan, Datum *values, char *Nulls, int tcount); extern void *SPI_prepare(char *src, int nargs, Oid *argtypes); diff --git a/src/include/executor/spi_priv.h b/src/include/executor/spi_priv.h new file mode 100644 index 00000000000..c0e44921f1c --- /dev/null +++ b/src/include/executor/spi_priv.h @@ -0,0 +1,38 @@ +/*------------------------------------------------------------------------- + * + * spi.c-- + * Server Programming Interface private declarations + * + * $Header: /cvsroot/pgsql/src/include/executor/spi_priv.h,v 1.1 1999/01/27 16:15:21 wieck Exp $ + * + *------------------------------------------------------------------------- + */ +#ifndef SPI_PRIV_H +#define SPI_PRIV_H + +#include "catalog/pg_type.h" +#include "access/printtup.h" + +typedef struct +{ + QueryTreeList *qtlist; /* malloced */ + uint32 processed; /* by Executor */ + SPITupleTable *tuptable; + Portal portal; /* portal per procedure */ + MemoryContext savedcxt; + CommandId savedId; +} _SPI_connection; + +typedef struct +{ + QueryTreeList *qtlist; + List *ptlist; + int nargs; + Oid *argtypes; +} _SPI_plan; + +#define _SPI_CPLAN_CURCXT 0 +#define _SPI_CPLAN_PROCXT 1 +#define _SPI_CPLAN_TOPCXT 2 + +#endif /* SPI_PRIV_H */ |