Add memory context identifier to portal context

Discussion: https://www.postgresql.org/message-id/6421.1522194949@sss.pgh.pa.us
This commit is contained in:
Peter Eisentraut 2018-04-06 12:34:15 -04:00
parent bbca77623f
commit 94c1f9ba11
1 changed files with 3 additions and 0 deletions

View File

@ -220,6 +220,9 @@ CreatePortal(const char *name, bool allowDup, bool dupSilent)
/* put portal in table (sets portal->name) */
PortalHashTableInsert(portal, name);
/* reuse portal->name copy */
MemoryContextSetIdentifier(portal->portalContext, portal->name);
return portal;
}