1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-05 02:22:28 +03:00

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.
This commit is contained in:
Neil Conway
2005-05-02 00:37:07 +00:00
parent 6c412f0605
commit f478856c7f
5 changed files with 49 additions and 49 deletions

View File

@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.136 2005/05/01 18:56:19 tgl Exp $
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.137 2005/05/02 00:37:07 neilc Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -158,7 +158,7 @@ static Datum exec_eval_expr(PLpgSQL_execstate *estate,
bool *isNull,
Oid *rettype);
static int exec_run_select(PLpgSQL_execstate *estate,
PLpgSQL_expr *expr, int maxtuples, Portal *portalP);
PLpgSQL_expr *expr, long maxtuples, Portal *portalP);
static void exec_move_row(PLpgSQL_execstate *estate,
PLpgSQL_rec *rec,
PLpgSQL_row *row,
@@ -3482,7 +3482,7 @@ exec_eval_expr(PLpgSQL_execstate *estate,
*/
static int
exec_run_select(PLpgSQL_execstate *estate,
PLpgSQL_expr *expr, int maxtuples, Portal *portalP)
PLpgSQL_expr *expr, long maxtuples, Portal *portalP)
{
int i;
Datum *values;