Include foreign tables in information_schema.table_privileges
authorPeter Eisentraut <[email protected]>
Tue, 15 Aug 2017 23:27:22 +0000 (19:27 -0400)
committerPeter Eisentraut <[email protected]>
Tue, 15 Aug 2017 23:33:04 +0000 (19:33 -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 <[email protected]>
src/backend/catalog/information_schema.sql

index c4f8f0f4eaa6bcf3cfe0ccf1a2c0b083ae1e2510..79dc219e579328213729eb5e539625182755138f 100644 (file)
@@ -1808,7 +1808,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')