mirror of
https://github.com/postgres/postgres.git
synced 2025-08-09 17:03:00 +03:00
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 commitcf34e373
, which was backpatched, but since object name/args arrays are new in commita676201490
, there is no need to backpatch this any further.
This commit is contained in:
@@ -4254,7 +4254,7 @@ getObjectIdentityParts(const ObjectAddress *object,
|
||||
ReleaseSysCache(tup);
|
||||
|
||||
if (OidIsValid(useid))
|
||||
usename = quote_identifier(GetUserNameFromId(useid));
|
||||
usename = GetUserNameFromId(useid);
|
||||
else
|
||||
usename = "public";
|
||||
|
||||
@@ -4264,7 +4264,8 @@ getObjectIdentityParts(const ObjectAddress *object,
|
||||
*objargs = list_make1(pstrdup(srv->servername));
|
||||
}
|
||||
|
||||
appendStringInfo(&buffer, "%s on server %s", usename,
|
||||
appendStringInfo(&buffer, "%s on server %s",
|
||||
quote_identifier(usename),
|
||||
srv->servername);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user