aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/prepare.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/prepare.c')
-rw-r--r--src/backend/commands/prepare.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c
index 21cb855aeb2..b945b1556a8 100644
--- a/src/backend/commands/prepare.c
+++ b/src/backend/commands/prepare.c
@@ -239,7 +239,7 @@ ExecuteQuery(ExecuteStmt *stmt, IntoClause *intoClause,
portal->visible = false;
/* Copy the plan's saved query string into the portal's memory */
- query_string = MemoryContextStrdup(PortalGetHeapMemory(portal),
+ query_string = MemoryContextStrdup(portal->portalContext,
entry->plansource->query_string);
/* Replan if needed, and increment plan refcount for portal */