summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Vondra2019-06-16 10:04:40 +0000
committerTomas Vondra2019-06-16 10:12:16 +0000
commitfc8cf3df478e054b892f6698b6d336e72f3a7328 (patch)
tree691c169aa100398c267314413b628f4abd00f0f7
parent7f44efa10b6ea3e5fd125e2800f357f38ab1068c (diff)
Fix privileges on pg_statistic_ext.tableoid
The GRANT in system_views allowed SELECT privileges on various columns in the pg_statistic_ext catalog, but tableoid was not included in the list. That made pg_dump fail because it's accessing this column when building the list of extended statistics to dump. Discussion: https://postgr.es/m/8833.1560647898%40sss.pgh.pa.us
-rw-r--r--src/backend/catalog/system_views.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index c8898901181..f9731453e32 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -291,7 +291,7 @@ CREATE VIEW pg_stats_ext WITH (security_barrier) AS
AND (c.relrowsecurity = false OR NOT row_security_active(c.oid));
REVOKE ALL on pg_statistic_ext FROM public;
-GRANT SELECT (oid, stxrelid, stxname, stxnamespace, stxowner, stxkeys, stxkind)
+GRANT SELECT (tableoid, oid, stxrelid, stxname, stxnamespace, stxowner, stxkeys, stxkind)
ON pg_statistic_ext TO public;
CREATE VIEW pg_publication_tables AS