mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
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.
This commit is contained in:
parent
e324f8ad61
commit
64d60c8bf0
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user