aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execMain.c12
-rw-r--r--src/backend/executor/functions.c4
-rw-r--r--src/backend/executor/spi.c24
3 files changed, 20 insertions, 20 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 76f7297c077..687256279ab 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -79,7 +79,7 @@ static void ExecutePlan(EState *estate, PlanState *planstate,
bool use_parallel_mode,
CmdType operation,
bool sendTuples,
- long numberTuples,
+ uint64 numberTuples,
ScanDirection direction,
DestReceiver *dest);
static bool ExecCheckRTEPerms(RangeTblEntry *rte);
@@ -278,7 +278,7 @@ standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
*/
void
ExecutorRun(QueryDesc *queryDesc,
- ScanDirection direction, long count)
+ ScanDirection direction, uint64 count)
{
if (ExecutorRun_hook)
(*ExecutorRun_hook) (queryDesc, direction, count);
@@ -288,7 +288,7 @@ ExecutorRun(QueryDesc *queryDesc,
void
standard_ExecutorRun(QueryDesc *queryDesc,
- ScanDirection direction, long count)
+ ScanDirection direction, uint64 count)
{
EState *estate;
CmdType operation;
@@ -1521,12 +1521,12 @@ ExecutePlan(EState *estate,
bool use_parallel_mode,
CmdType operation,
bool sendTuples,
- long numberTuples,
+ uint64 numberTuples,
ScanDirection direction,
DestReceiver *dest)
{
TupleTableSlot *slot;
- long current_tuple_count;
+ uint64 current_tuple_count;
/*
* initialize local variables
@@ -1542,7 +1542,7 @@ ExecutePlan(EState *estate,
* If a tuple count was supplied, we must force the plan to run without
* parallelism, because we might exit early.
*/
- if (numberTuples != 0)
+ if (numberTuples)
use_parallel_mode = false;
/*
diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c
index c3cdad4abf7..6e14c9d2967 100644
--- a/src/backend/executor/functions.c
+++ b/src/backend/executor/functions.c
@@ -853,7 +853,7 @@ postquel_getnext(execution_state *es, SQLFunctionCachePtr fcache)
else
{
/* Run regular commands to completion unless lazyEval */
- long count = (es->lazyEval) ? 1L : 0L;
+ uint64 count = (es->lazyEval) ? 1 : 0;
ExecutorRun(es->qd, ForwardScanDirection, count);
@@ -861,7 +861,7 @@ postquel_getnext(execution_state *es, SQLFunctionCachePtr fcache)
* If we requested run to completion OR there was no tuple returned,
* command must be complete.
*/
- result = (count == 0L || es->qd->estate->es_processed == 0);
+ result = (count == 0 || es->qd->estate->es_processed == 0);
}
return result;
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 3357c0d2524..3d04c23b4e0 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -36,7 +36,7 @@
#include "utils/typcache.h"
-uint32 SPI_processed = 0;
+uint64 SPI_processed = 0;
Oid SPI_lastoid = InvalidOid;
SPITupleTable *SPI_tuptable = NULL;
int SPI_result;
@@ -56,12 +56,12 @@ static void _SPI_prepare_oneshot_plan(const char *src, SPIPlanPtr plan);
static int _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
Snapshot snapshot, Snapshot crosscheck_snapshot,
- bool read_only, bool fire_triggers, long tcount);
+ bool read_only, bool fire_triggers, uint64 tcount);
static ParamListInfo _SPI_convert_params(int nargs, Oid *argtypes,
Datum *Values, const char *Nulls);
-static int _SPI_pquery(QueryDesc *queryDesc, bool fire_triggers, long tcount);
+static int _SPI_pquery(QueryDesc *queryDesc, bool fire_triggers, uint64 tcount);
static void _SPI_error_callback(void *arg);
@@ -1991,10 +1991,10 @@ _SPI_prepare_oneshot_plan(const char *src, SPIPlanPtr plan)
static int
_SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
Snapshot snapshot, Snapshot crosscheck_snapshot,
- bool read_only, bool fire_triggers, long tcount)
+ bool read_only, bool fire_triggers, uint64 tcount)
{
int my_res = 0;
- uint32 my_processed = 0;
+ uint64 my_processed = 0;
Oid my_lastoid = InvalidOid;
SPITupleTable *my_tuptable = NULL;
int res = 0;
@@ -2218,8 +2218,8 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
if (IsA(stmt, CreateTableAsStmt))
{
Assert(strncmp(completionTag, "SELECT ", 7) == 0);
- _SPI_current->processed = strtoul(completionTag + 7,
- NULL, 10);
+ _SPI_current->processed = pg_strtouint64(completionTag + 7,
+ NULL, 10);
/*
* For historical reasons, if CREATE TABLE AS was spelled
@@ -2231,8 +2231,8 @@ _SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
else if (IsA(stmt, CopyStmt))
{
Assert(strncmp(completionTag, "COPY ", 5) == 0);
- _SPI_current->processed = strtoul(completionTag + 5,
- NULL, 10);
+ _SPI_current->processed = pg_strtouint64(completionTag + 5,
+ NULL, 10);
}
}
@@ -2348,7 +2348,7 @@ _SPI_convert_params(int nargs, Oid *argtypes,
}
static int
-_SPI_pquery(QueryDesc *queryDesc, bool fire_triggers, long tcount)
+_SPI_pquery(QueryDesc *queryDesc, bool fire_triggers, uint64 tcount)
{
int operation = queryDesc->operation;
int eflags;
@@ -2460,7 +2460,7 @@ static void
_SPI_cursor_operation(Portal portal, FetchDirection direction, long count,
DestReceiver *dest)
{
- long nfetched;
+ uint64 nfetched;
/* Check that the portal is valid */
if (!PortalIsValid(portal))
@@ -2563,7 +2563,7 @@ _SPI_end_call(bool procmem)
static bool
_SPI_checktuples(void)
{
- uint32 processed = _SPI_current->processed;
+ uint64 processed = _SPI_current->processed;
SPITupleTable *tuptable = _SPI_current->tuptable;
bool failed = false;