diff options
Diffstat (limited to 'src/include/executor')
-rw-r--r-- | src/include/executor/spi.h | 17 | ||||
-rw-r--r-- | src/include/executor/spi_priv.h | 1 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index 9c70603434a..5740f8956e5 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -42,6 +42,17 @@ typedef struct SPIPrepareOptions int cursorOptions; } SPIPrepareOptions; +/* Optional arguments for SPI_execute_plan_extended */ +typedef struct SPIExecuteOptions +{ + ParamListInfo params; + bool read_only; + bool no_snapshots; + uint64 tcount; + DestReceiver *dest; + ResourceOwner owner; +} SPIExecuteOptions; + /* Plans are opaque structs for standard users of SPI */ typedef struct _SPI_plan *SPIPlanPtr; @@ -96,13 +107,11 @@ extern int SPI_finish(void); extern int SPI_execute(const char *src, bool read_only, long tcount); extern int SPI_execute_plan(SPIPlanPtr plan, Datum *Values, const char *Nulls, bool read_only, long tcount); +extern int SPI_execute_plan_extended(SPIPlanPtr plan, + const SPIExecuteOptions *options); extern int SPI_execute_plan_with_paramlist(SPIPlanPtr plan, ParamListInfo params, bool read_only, long tcount); -extern int SPI_execute_plan_with_receiver(SPIPlanPtr plan, - ParamListInfo params, - bool read_only, long tcount, - DestReceiver *dest); extern int SPI_exec(const char *src, long tcount); extern int SPI_execp(SPIPlanPtr plan, Datum *Values, const char *Nulls, long tcount); diff --git a/src/include/executor/spi_priv.h b/src/include/executor/spi_priv.h index ce0f58ce687..97f4279ac4a 100644 --- a/src/include/executor/spi_priv.h +++ b/src/include/executor/spi_priv.h @@ -92,7 +92,6 @@ typedef struct _SPI_plan int magic; /* should equal _SPI_PLAN_MAGIC */ bool saved; /* saved or unsaved plan? */ bool oneshot; /* one-shot plan? */ - bool no_snapshots; /* let the caller handle the snapshots */ List *plancache_list; /* one CachedPlanSource per parsetree */ MemoryContext plancxt; /* Context containing _SPI_plan and data */ RawParseMode parse_mode; /* raw_parser() mode */ |