Remove extra space from dumped ALTER DEFAULT PRIVILEGES.
Author: Nathan Bossart Discussion: https://postgr.es/m/20221206232744.GA3560301@nathanxps13
This commit is contained in:
parent
45f5c81ad2
commit
2af33369e7
@ -184,7 +184,9 @@ buildACLCommands(const char *name, const char *subname, const char *nspname,
|
||||
prefix, privs->data, type);
|
||||
if (nspname && *nspname)
|
||||
appendPQExpBuffer(firstsql, "%s.", fmtId(nspname));
|
||||
appendPQExpBuffer(firstsql, "%s FROM ", name);
|
||||
if (name && *name)
|
||||
appendPQExpBuffer(firstsql, "%s ", name);
|
||||
appendPQExpBufferStr(firstsql, "FROM ");
|
||||
if (grantee->len == 0)
|
||||
appendPQExpBufferStr(firstsql, "PUBLIC;\n");
|
||||
else
|
||||
@ -253,7 +255,9 @@ buildACLCommands(const char *name, const char *subname, const char *nspname,
|
||||
prefix, privs->data, type);
|
||||
if (nspname && *nspname)
|
||||
appendPQExpBuffer(thissql, "%s.", fmtId(nspname));
|
||||
appendPQExpBuffer(thissql, "%s TO ", name);
|
||||
if (name && *name)
|
||||
appendPQExpBuffer(thissql, "%s ", name);
|
||||
appendPQExpBufferStr(thissql, "TO ");
|
||||
if (grantee->len == 0)
|
||||
appendPQExpBufferStr(thissql, "PUBLIC;\n");
|
||||
else
|
||||
@ -265,7 +269,9 @@ buildACLCommands(const char *name, const char *subname, const char *nspname,
|
||||
prefix, privswgo->data, type);
|
||||
if (nspname && *nspname)
|
||||
appendPQExpBuffer(thissql, "%s.", fmtId(nspname));
|
||||
appendPQExpBuffer(thissql, "%s TO ", name);
|
||||
if (name && *name)
|
||||
appendPQExpBuffer(thissql, "%s ", name);
|
||||
appendPQExpBufferStr(thissql, "TO ");
|
||||
if (grantee->len == 0)
|
||||
appendPQExpBufferStr(thissql, "PUBLIC");
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user