From 0f7c49e85518dd846ccd0a044d49a922b9132983 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 16 Dec 2017 17:26:26 -0500 Subject: 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 Reviewed-by: Alvaro Herrera --- src/backend/tcop/postgres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/tcop/postgres.c') diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 4654a01eabe..ddc3ec860ae 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -1608,7 +1608,7 @@ exec_bind_message(StringInfo input_message) * don't want a failure to occur between GetCachedPlan and * PortalDefineQuery; that would result in leaking our plancache refcount. */ - oldContext = MemoryContextSwitchTo(PortalGetHeapMemory(portal)); + oldContext = MemoryContextSwitchTo(portal->portalContext); /* Copy the plan's query string into the portal */ query_string = pstrdup(psrc->query_string); -- cgit v1.2.3