On Thu, Aug 10, 2017 at 6:30 PM, Nicolas Thauvin <nicolas.thau...@dalibo.com> wrote: > Hello, > > The information_schema.table_privileges view filters on regular tables > and views. Foreign tables are not shown in this view but they are in > other views of the information_schema like tables or column_privileges. > > Is it intentional? A patch is attached if not.
The line was first added by 596652d6 and updated by 262e821d to include partitioned tables. Looks like we have forgot to add tables added in between i.e. foreign tables and materialized views. column_privileges doesn't have materialized views. Attached patch adds materialized views to column_privileges view along with your changes. Please add this to the next commitfest so that it doesn't get forgotten. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company
diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql index 98bcfa0..fbb5460 100644 --- a/src/backend/catalog/information_schema.sql +++ b/src/backend/catalog/information_schema.sql @@ -573,7 +573,7 @@ CREATE VIEW column_privileges AS pr_c.relowner FROM (SELECT oid, relname, relnamespace, relowner, (aclexplode(coalesce(relacl, acldefault('r', relowner)))).* FROM pg_class - WHERE relkind IN ('r', 'v', 'f', 'p') + WHERE relkind IN ('r', 'v', 'f', 'p', 'm') ) pr_c (oid, relname, relnamespace, relowner, grantor, grantee, prtype, grantable), pg_attribute a WHERE a.attrelid = pr_c.oid @@ -595,7 +595,7 @@ CREATE VIEW column_privileges AS ) pr_a (attrelid, attname, grantor, grantee, prtype, grantable), pg_class c WHERE pr_a.attrelid = c.oid - AND relkind IN ('r', 'v', 'f', 'p') + AND relkind IN ('r', 'v', 'f', 'p', 'm') ) x, pg_namespace nc, pg_authid u_grantor, @@ -1868,7 +1868,7 @@ CREATE VIEW table_privileges AS ) AS grantee (oid, rolname) WHERE c.relnamespace = nc.oid - AND c.relkind IN ('r', 'v', 'p') + AND c.relkind IN ('r', 'v', 'f', 'p', 'm') AND c.grantee = grantee.oid AND c.grantor = u_grantor.oid AND c.prtype IN ('INSERT', 'SELECT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER')
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers