Skip to content

Commit f307a2d

Browse files
author
Commitfest Bot
committed
[CF 5747] Allow parallelism for plpgsql return expression after commit 556f7b7
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5747 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CABgZEgdfbnq9t6xXJnmXbChNTcWFjeM_6nuig41tm327gYi2ig@mail.gmail.com Author(s): Dipesh Dhameliya
2 parents 62a17a9 + 2e44cd3 commit f307a2d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pl/plpgsql/src/pl_exec.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ static Datum exec_eval_expr(PLpgSQL_execstate *estate,
385385
Oid *rettype,
386386
int32 *rettypmod);
387387
static int exec_run_select(PLpgSQL_execstate *estate,
388-
PLpgSQL_expr *expr, long maxtuples, Portal *portalP);
388+
PLpgSQL_expr *expr, Portal *portalP);
389389
static int exec_for_query(PLpgSQL_execstate *estate, PLpgSQL_stmt_forq *stmt,
390390
Portal portal, bool prefetch_ok);
391391
static 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
*/
57625762
static int
57635763
exec_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

Comments
 (0)