diff options
-rw-r--r-- | src/backend/utils/mmgr/portalmem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 7072ce48a3e..ec6f80ee99b 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -220,8 +220,8 @@ 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); + /* for named portals reuse portal->name copy */ + MemoryContextSetIdentifier(portal->portalContext, portal->name[0] ? portal->name : "<unnamed>"); return portal; } |