From f478856c7f875efceea27f30041965571815f05b Mon Sep 17 00:00:00 2001 From: Neil Conway Date: Mon, 2 May 2005 00:37:07 +0000 Subject: Change SPI functions to use a `long' when specifying the number of tuples to produce when running the executor. This is consistent with the internal executor APIs (such as ExecutorRun), which also use a long for this purpose. It also allows FETCH_ALL to be passed -- since FETCH_ALL is defined as LONG_MAX, this wouldn't have worked on platforms where int and long are of different sizes. Per report from Tzahi Fadida. --- src/include/executor/spi.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/include/executor') diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h index 10e4747dd9f..23562c75e55 100644 --- a/src/include/executor/spi.h +++ b/src/include/executor/spi.h @@ -2,7 +2,7 @@ * * spi.h * - * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.51 2005/03/29 02:53:53 neilc Exp $ + * $PostgreSQL: pgsql/src/include/executor/spi.h,v 1.52 2005/05/02 00:37:06 neilc Exp $ * *------------------------------------------------------------------------- */ @@ -82,17 +82,17 @@ extern int SPI_finish(void); extern void SPI_push(void); extern void SPI_pop(void); extern void SPI_restore_connection(void); -extern int SPI_execute(const char *src, bool read_only, int tcount); +extern int SPI_execute(const char *src, bool read_only, long tcount); extern int SPI_execute_plan(void *plan, Datum *Values, const char *Nulls, - bool read_only, int tcount); -extern int SPI_exec(const char *src, int tcount); + bool read_only, long tcount); +extern int SPI_exec(const char *src, long tcount); extern int SPI_execp(void *plan, Datum *Values, const char *Nulls, - int tcount); + long tcount); extern int SPI_execute_snapshot(void *plan, Datum *Values, const char *Nulls, Snapshot snapshot, Snapshot crosscheck_snapshot, - bool read_only, int tcount); + bool read_only, long tcount); extern void *SPI_prepare(const char *src, int nargs, Oid *argtypes); extern void *SPI_saveplan(void *plan); extern int SPI_freeplan(void *plan); @@ -123,8 +123,8 @@ extern void SPI_freetuptable(SPITupleTable *tuptable); extern Portal SPI_cursor_open(const char *name, void *plan, Datum *Values, const char *Nulls, bool read_only); extern Portal SPI_cursor_find(const char *name); -extern void SPI_cursor_fetch(Portal portal, bool forward, int count); -extern void SPI_cursor_move(Portal portal, bool forward, int count); +extern void SPI_cursor_fetch(Portal portal, bool forward, long count); +extern void SPI_cursor_move(Portal portal, bool forward, long count); extern void SPI_cursor_close(Portal portal); extern void AtEOXact_SPI(bool isCommit); -- cgit v1.2.3