summaryrefslogtreecommitdiff
path: root/src/backend/commands/prepare.c
diff options
context:
space:
mode:
authorPeter Eisentraut2017-12-16 22:26:26 +0000
committerPeter Eisentraut2018-01-09 18:47:56 +0000
commit0f7c49e85518dd846ccd0a044d49a922b9132983 (patch)
tree1bcbff190de4cc6f8c02e3ecbb2e9b753bbb1ef5 /src/backend/commands/prepare.c
parent3cb1b2a8804da8365fe17f687d96b720df4a583d (diff)
Update portal-related memory context names and API
Rename PortalMemory to TopPortalContext, to avoid confusion with PortalContext and align naming with similar top-level memory contexts. Rename PortalData's "heap" field to portalContext. The "heap" naming seems quite antiquated and confusing. Also get rid of the PortalGetHeapMemory() macro and access the field directly, which we do for other portal fields, so this abstraction doesn't buy anything. Reviewed-by: Andrew Dunstan <[email protected]> Reviewed-by: Alvaro Herrera <[email protected]>
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 */