Content-Length: 275598 | pFad | http://github.com/postgrespro/postgres/commit/b3196e65f5bfc997ec7fa3f91645a09289c10dee

DE Fix bug for array-formatted identities of user mappings · postgrespro/postgres@b3196e6 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/b3196e65f5bfc997ec7fa3f91645a09289c10dee

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy