diff options
Diffstat (limited to 'src/backend/tcop')
-rw-r--r-- | src/backend/tcop/postgres.c | 4 | ||||
-rw-r--r-- | src/backend/tcop/pquery.c | 13 |
2 files changed, 6 insertions, 11 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 5d699f7ff7c..52e6cb638eb 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -1217,7 +1217,7 @@ exec_simple_query(const char *query_string) (void) PortalRun(portal, FETCH_ALL, true, /* always top level */ - true, + true, /* ignored */ receiver, receiver, &qc); @@ -2215,7 +2215,7 @@ exec_execute_message(const char *portal_name, long max_rows) completed = PortalRun(portal, max_rows, true, /* always top level */ - !execute_is_fetch && max_rows == FETCH_ALL, + true, /* ignored */ receiver, receiver, &qc); diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index 61e18926a5b..500620a22e4 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -667,6 +667,8 @@ PortalSetResultFormat(Portal portal, int nFormats, int16 *formats) * isTopLevel: true if query is being executed at backend "top level" * (that is, directly from a client command message) * + * run_once: ignored, present only to avoid an API break in stable branches. + * * dest: where to send output of primary (canSetTag) query * * altdest: where to send output of non-primary queries @@ -711,10 +713,6 @@ PortalRun(Portal portal, long count, bool isTopLevel, bool run_once, */ MarkPortalActive(portal); - /* Set run_once flag. Shouldn't be clear if previously set. */ - Assert(!portal->run_once || run_once); - portal->run_once = run_once; - /* * Set up global portal context pointers. * @@ -919,7 +917,7 @@ PortalRunSelect(Portal portal, { PushActiveSnapshot(queryDesc->snapshot); ExecutorRun(queryDesc, direction, (uint64) count, - portal->run_once); + false); nprocessed = queryDesc->estate->es_processed; PopActiveSnapshot(); } @@ -959,7 +957,7 @@ PortalRunSelect(Portal portal, { PushActiveSnapshot(queryDesc->snapshot); ExecutorRun(queryDesc, direction, (uint64) count, - portal->run_once); + false); nprocessed = queryDesc->estate->es_processed; PopActiveSnapshot(); } @@ -1403,9 +1401,6 @@ PortalRunFetch(Portal portal, */ MarkPortalActive(portal); - /* If supporting FETCH, portal can't be run-once. */ - Assert(!portal->run_once); - /* * Set up global portal context pointers. */ |