diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-09-08 17:11:16 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-09-08 17:15:00 +0200 |
commit | 728d4bc16b79dea0dd6d540aa5c55a84ac722a09 (patch) | |
tree | faf78db5258ca65322fab61c1f9a889300812f1f /src | |
parent | 1dec091d5b0bfad1a9b061cac820236e98cbd72c (diff) | |
download | postgresql-728d4bc16b79dea0dd6d540aa5c55a84ac722a09.tar.gz postgresql-728d4bc16b79dea0dd6d540aa5c55a84ac722a09.zip |
Use <unnamed> for name of unnamed portal's memory context
Otherwise just printing an empty string makes the memory context debug
output slightly confusing.
Discussion: https://www.postgresql.org/message-id/flat/ccb353ef-89ff-09b3-8046-1d2514624b9c%402ndquadrant.com
Diffstat (limited to 'src')
-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; } |