diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-16 12:01:59 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-16 12:01:59 -0500 |
commit | c49d926833fa6a987e3f9a66027f4a01d7a008be (patch) | |
tree | e2eb64f8d7406a299c9c4fd8d758fbe5aaddb5f7 /src/bin/pg_dump/dumputils.c | |
parent | 58e2e6eb67fec14c793c74207407e172d7e0291d (diff) | |
download | postgresql-c49d926833fa6a987e3f9a66027f4a01d7a008be.tar.gz postgresql-c49d926833fa6a987e3f9a66027f4a01d7a008be.zip |
Clean up some more freshly-dead code in pg_dump and pg_upgrade.
I missed a few things in 30e7c175b and e469f0aaf,
as noted by Justin Pryzby.
Discussion: https://postgr.es/m/2923349.1634942313@sss.pgh.pa.us
Diffstat (limited to 'src/bin/pg_dump/dumputils.c')
-rw-r--r-- | src/bin/pg_dump/dumputils.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index dfc96bc98ba..b5900e4ed84 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -39,8 +39,7 @@ static void AddAcl(PQExpBuffer aclbuf, const char *keyword, * TABLE, SEQUENCE, FUNCTION, PROCEDURE, LANGUAGE, SCHEMA, DATABASE, TABLESPACE, * FOREIGN DATA WRAPPER, SERVER, or LARGE OBJECT) * acls: the ACL string fetched from the database - * baseacls: the initial ACL string for this object; can be - * NULL or empty string to indicate "not available from server" + * baseacls: the initial ACL string for this object * owner: username of object owner (will be passed through fmtId); can be * NULL or empty string to indicate "no owner known" * prefix: string to prefix to each generated command; typically empty @@ -104,17 +103,14 @@ buildACLCommands(const char *name, const char *subname, const char *nspname, return false; } - /* Parse the baseacls, if provided */ - if (baseacls && *baseacls != '\0') + /* Parse the baseacls too */ + if (!parsePGArray(baseacls, &baseitems, &nbaseitems)) { - if (!parsePGArray(baseacls, &baseitems, &nbaseitems)) - { - if (aclitems) - free(aclitems); - if (baseitems) - free(baseitems); - return false; - } + if (aclitems) + free(aclitems); + if (baseitems) + free(baseitems); + return false; } /* |