Commit 728d4bc1 authored by Peter Eisentraut's avatar Peter Eisentraut

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
parent 1dec091d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment