summaryrefslogtreecommitdiff
path: root/src/backend/executor/execParallel.c
diff options
context:
space:
mode:
authorTom Lane2021-04-15 21:17:45 +0000
committerTom Lane2021-04-15 21:17:45 +0000
commit83efce7a1ebc5bae79617ddba12a64790141725c (patch)
tree2391737f497de578bbde6febdaa1309062f4bbde /src/backend/executor/execParallel.c
parent1111b2668d89bfcb6f502789158b1233ab4217a6 (diff)
Revert "Cope with NULL query string in ExecInitParallelPlan()."
This reverts commit b3ee4c503872f3d0a5d6a7cbde48815f555af15b. We don't need it in the wake of the preceding commit, which added an upstream check that the querystring isn't null. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/executor/execParallel.c')
-rw-r--r--src/backend/executor/execParallel.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/backend/executor/execParallel.c b/src/backend/executor/execParallel.c
index 4fca8782b2f..5dab1e36b9b 100644
--- a/src/backend/executor/execParallel.c
+++ b/src/backend/executor/execParallel.c
@@ -647,7 +647,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate,
shm_toc_estimate_keys(&pcxt->estimator, 1);
/* Estimate space for query text. */
- query_len = estate->es_sourceText ? strlen(estate->es_sourceText) : 0;
+ query_len = strlen(estate->es_sourceText);
shm_toc_estimate_chunk(&pcxt->estimator, query_len + 1);
shm_toc_estimate_keys(&pcxt->estimator, 1);
@@ -742,10 +742,7 @@ ExecInitParallelPlan(PlanState *planstate, EState *estate,
/* Store query string */
query_string = shm_toc_allocate(pcxt->toc, query_len + 1);
- if (query_len == 0)
- query_string[0] = 0;
- else
- memcpy(query_string, estate->es_sourceText, query_len + 1);
+ memcpy(query_string, estate->es_sourceText, query_len + 1);
shm_toc_insert(pcxt->toc, PARALLEL_KEY_QUERY_TEXT, query_string);
/* Store serialized PlannedStmt. */