Commit b3196e65 authored by Alvaro Herrera's avatar Alvaro Herrera

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 cf34e373, which was backpatched,
but since object name/args arrays are new in commit a6762014, there
is no need to backpatch this any further.
parent dc8e0529
...@@ -4254,7 +4254,7 @@ getObjectIdentityParts(const ObjectAddress *object, ...@@ -4254,7 +4254,7 @@ getObjectIdentityParts(const ObjectAddress *object,
ReleaseSysCache(tup); ReleaseSysCache(tup);
if (OidIsValid(useid)) if (OidIsValid(useid))
usename = quote_identifier(GetUserNameFromId(useid)); usename = GetUserNameFromId(useid);
else else
usename = "public"; usename = "public";
...@@ -4264,7 +4264,8 @@ getObjectIdentityParts(const ObjectAddress *object, ...@@ -4264,7 +4264,8 @@ getObjectIdentityParts(const ObjectAddress *object,
*objargs = list_make1(pstrdup(srv->servername)); *objargs = list_make1(pstrdup(srv->servername));
} }
appendStringInfo(&buffer, "%s on server %s", usename, appendStringInfo(&buffer, "%s on server %s",
quote_identifier(usename),
srv->servername); srv->servername);
break; break;
} }
......
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