From 409abc15293efdc8ec65db77efa40d2d9517ad0b Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 5 Sep 2020 08:09:51 +0200 Subject: [PATCH] Use for name of unnamed portal's memory context Otherwise just printing an empty string makes the memory context debug output slightly confusing. --- src/backend/utils/mmgr/portalmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 7072ce48a3..bee81368aa 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -221,7 +221,7 @@ CreatePortal(const char *name, bool allowDup, bool dupSilent) PortalHashTableInsert(portal, name); /* reuse portal->name copy */ - MemoryContextSetIdentifier(portal->portalContext, portal->name); + MemoryContextSetIdentifier(portal->portalContext, portal->name[0] ? portal->name : ""); return portal; } -- 2.28.0