Skip to content

Commit b3196e6

Browse files
committed
Fix bug for array-formatted identities of user mappings
I failed to realize that server names reported in the object args array would get quoted, which is wrong; remove that, making sure that it's only quoted in the string-formatted identity. This bug was introduced by my commit cf34e37, which was backpatched, but since object name/args arrays are new in commit a676201, there is no need to backpatch this any further.
1 parent dc8e052 commit b3196e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/catalog/objectaddress.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4254,7 +4254,7 @@ getObjectIdentityParts(const ObjectAddress *object,
42544254
ReleaseSysCache(tup);
42554255

42564256
if (OidIsValid(useid))
4257-
usename = quote_identifier(GetUserNameFromId(useid));
4257+
usename = GetUserNameFromId(useid);
42584258
else
42594259
usename = "public";
42604260

@@ -4264,7 +4264,8 @@ getObjectIdentityParts(const ObjectAddress *object,
42644264
*objargs = list_make1(pstrdup(srv->servername));
42654265
}
42664266

4267-
appendStringInfo(&buffer, "%s on server %s", usename,
4267+
appendStringInfo(&buffer, "%s on server %s",
4268+
quote_identifier(usename),
42684269
srv->servername);
42694270
break;
42704271
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy