aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop')
-rw-r--r--src/backend/tcop/postgres.c4
-rw-r--r--src/backend/tcop/pquery.c13
2 files changed, 6 insertions, 11 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 3f427f1b47f..73d6a6194f1 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -1278,7 +1278,7 @@ exec_simple_query(const char *query_string)
(void) PortalRun(portal,
FETCH_ALL,
true, /* always top level */
- true,
+ true, /* ignored */
receiver,
receiver,
&qc);
@@ -2259,7 +2259,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 5565f200c3d..3a20feb867f 100644
--- a/src/backend/tcop/pquery.c
+++ b/src/backend/tcop/pquery.c
@@ -670,6 +670,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
@@ -714,10 +716,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.
*
@@ -922,7 +920,7 @@ PortalRunSelect(Portal portal,
{
PushActiveSnapshot(queryDesc->snapshot);
ExecutorRun(queryDesc, direction, (uint64) count,
- portal->run_once);
+ false);
nprocessed = queryDesc->estate->es_processed;
PopActiveSnapshot();
}
@@ -962,7 +960,7 @@ PortalRunSelect(Portal portal,
{
PushActiveSnapshot(queryDesc->snapshot);
ExecutorRun(queryDesc, direction, (uint64) count,
- portal->run_once);
+ false);
nprocessed = queryDesc->estate->es_processed;
PopActiveSnapshot();
}
@@ -1406,9 +1404,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.
*/