Include foreign tables in information_schema.table_privileges
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 15 Aug 2017 23:27:22 +0000 (19:27 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 15 Aug 2017 23:31:06 +0000 (19:31 -0400)
This appears to have been an omission in the original commit
0d692a0dc9f.  All related information_schema views already include
foreign tables.

Reported-by: Nicolas Thauvin <nicolas.thauvin@dalibo.com>
src/backend/catalog/information_schema.sql

index 18be08fead5762970e7a9718422c6fd0835bd209..3c46ff1f3fd8b5fb80b42227b55c23ad35946bd2 100644 (file)
@@ -1853,7 +1853,7 @@ CREATE VIEW table_privileges AS
          ) AS grantee (oid, rolname)
 
     WHERE c.relnamespace = nc.oid
-          AND c.relkind IN ('r', 'v')
+          AND c.relkind IN ('r', 'v', 'f')
           AND c.grantee = grantee.oid
           AND c.grantor = u_grantor.oid
           AND c.prtype IN ('INSERT', 'SELECT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER')