@@ -385,7 +385,7 @@ static Datum exec_eval_expr(PLpgSQL_execstate *estate,
385385 Oid * rettype ,
386386 int32 * rettypmod );
387387static int exec_run_select (PLpgSQL_execstate * estate ,
388- PLpgSQL_expr * expr , long maxtuples , Portal * portalP );
388+ PLpgSQL_expr * expr , Portal * portalP );
389389static int exec_for_query (PLpgSQL_execstate * estate , PLpgSQL_stmt_forq * stmt ,
390390 Portal portal , bool prefetch_ok );
391391static ParamListInfo setup_param_list (PLpgSQL_execstate * estate ,
@@ -2181,7 +2181,7 @@ exec_stmt_perform(PLpgSQL_execstate *estate, PLpgSQL_stmt_perform *stmt)
21812181{
21822182 PLpgSQL_expr * expr = stmt -> expr ;
21832183
2184- (void ) exec_run_select (estate , expr , 0 , NULL );
2184+ (void ) exec_run_select (estate , expr , NULL );
21852185 exec_set_found (estate , (estate -> eval_processed != 0 ));
21862186 exec_eval_cleanup (estate );
21872187
@@ -2844,7 +2844,7 @@ exec_stmt_fors(PLpgSQL_execstate *estate, PLpgSQL_stmt_fors *stmt)
28442844 /*
28452845 * Open the implicit cursor for the statement using exec_run_select
28462846 */
2847- exec_run_select (estate , stmt -> query , 0 , & portal );
2847+ exec_run_select (estate , stmt -> query , & portal );
28482848
28492849 /*
28502850 * Execute the loop
@@ -5703,7 +5703,7 @@ exec_eval_expr(PLpgSQL_execstate *estate,
57035703 /*
57045704 * Else do it the hard way via exec_run_select
57055705 */
5706- rc = exec_run_select (estate , expr , 2 , NULL );
5706+ rc = exec_run_select (estate , expr , NULL );
57075707 if (rc != SPI_OK_SELECT )
57085708 ereport (ERROR ,
57095709 (errcode (ERRCODE_WRONG_OBJECT_TYPE ),
@@ -5761,7 +5761,7 @@ exec_eval_expr(PLpgSQL_execstate *estate,
57615761 */
57625762static int
57635763exec_run_select (PLpgSQL_execstate * estate ,
5764- PLpgSQL_expr * expr , long maxtuples , Portal * portalP )
5764+ PLpgSQL_expr * expr , Portal * portalP )
57655765{
57665766 ParamListInfo paramLI ;
57675767 int rc ;
@@ -5810,7 +5810,7 @@ exec_run_select(PLpgSQL_execstate *estate,
58105810 * Execute the query
58115811 */
58125812 rc = SPI_execute_plan_with_paramlist (expr -> plan , paramLI ,
5813- estate -> readonly_func , maxtuples );
5813+ estate -> readonly_func , 0 );
58145814 if (rc != SPI_OK_SELECT )
58155815 {
58165816 /*
0 commit comments