aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2011-08-27 15:03:02 +0300
committerPeter Eisentraut <peter_e@gmx.net>2011-08-27 15:03:02 +0300
commitfd5b397ca4963bf91a54678be51207bf827e512a (patch)
treeaaca2392dc8944f8c4e78d48f56a428800ffe445 /src
parent3104cc89be65614ef3d0748e1cc19fb5394969e9 (diff)
downloadpostgresql-fd5b397ca4963bf91a54678be51207bf827e512a.tar.gz
postgresql-fd5b397ca4963bf91a54678be51207bf827e512a.zip
Implement the information schema with_hierarchy column
In PostgreSQL, this is included in the SELECT privilege, so show YES or NO depending on whether SELECT is granted.
Diffstat (limited to 'src')
-rw-r--r--src/backend/catalog/information_schema.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/catalog/information_schema.sql b/src/backend/catalog/information_schema.sql
index 47c48bfb275..e5555d6148e 100644
--- a/src/backend/catalog/information_schema.sql
+++ b/src/backend/catalog/information_schema.sql
@@ -1785,7 +1785,7 @@ CREATE VIEW table_privileges AS
pg_has_role(grantee.oid, c.relowner, 'USAGE')
OR c.grantable
THEN 'YES' ELSE 'NO' END AS yes_or_no) AS is_grantable,
- CAST('NO' AS yes_or_no) AS with_hierarchy
+ CAST(CASE WHEN c.prtype = 'SELECT' THEN 'YES' ELSE 'NO' END AS yes_or_no) AS with_hierarchy
FROM (
SELECT oid, relname, relnamespace, relkind, relowner, (aclexplode(relacl)).* FROM pg_class