diff options
author | Stephen Frost <sfrost@snowman.net> | 2016-05-06 14:06:50 -0400 |
---|---|---|
committer | Stephen Frost <sfrost@snowman.net> | 2016-05-06 14:06:50 -0400 |
commit | 64d60c8bf0703011d79dcb8a55dc42dcedc1e10f (patch) | |
tree | 57cdae55ffd31d9be11cda839ab0341ebf008ac8 /src | |
parent | e324f8ad610bdc83a1392e54da5d9613e710b02f (diff) | |
download | postgresql-64d60c8bf0703011d79dcb8a55dc42dcedc1e10f.tar.gz postgresql-64d60c8bf0703011d79dcb8a55dc42dcedc1e10f.zip |
Correct pg_dump WHERE clause for functions/aggregates
The query to grab the function/aggregate information is now joining
to pg_init_privs, so we can simplify (and correct) the WHERE clause
used to determine if a given function's ACL has changed from the
initial ACL on the function.
Bug found by Noah, patch by me.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 582509396bb..e400a7d17a3 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -4673,11 +4673,7 @@ getAggregates(Archive *fout, int *numAggs) "p.pronamespace != " "(SELECT oid FROM pg_namespace " "WHERE nspname = 'pg_catalog') OR " - "EXISTS (SELECT * FROM pg_init_privs pip " - "WHERE p.oid = pip.objoid AND pip.classoid = " - "(SELECT oid FROM pg_class " - "WHERE relname = 'pg_proc') " - "AND p.proacl IS DISTINCT FROM pip.initprivs)", + "p.proacl IS DISTINCT FROM pip.initprivs", username_subquery, acl_subquery->data, racl_subquery->data, @@ -4923,11 +4919,7 @@ getFuncs(Archive *fout, int *numFuncs) "pronamespace != " "(SELECT oid FROM pg_namespace " "WHERE nspname = 'pg_catalog') OR " - "EXISTS (SELECT * FROM pg_init_privs pip " - "WHERE p.oid = pip.objoid AND pip.classoid = " - "(SELECT oid FROM pg_class " - "WHERE relname = 'pg_proc') " - "AND p.proacl IS DISTINCT FROM pip.initprivs)", + "p.proacl IS DISTINCT FROM pip.initprivs", acl_subquery->data, racl_subquery->data, initacl_subquery->data, |