Skip to content

Commit

Permalink
[#3816] materialized views in _table_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Sep 15, 2017
1 parent 15db64b commit af1ceba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckanext/datastore/set_permissions.sql
Expand Up @@ -63,9 +63,9 @@ CREATE OR REPLACE VIEW "_table_metadata" AS
LEFT OUTER JOIN pg_class AS dependent ON d.refobjid = dependent.oid
WHERE
(dependee.oid != dependent.oid OR dependent.oid IS NULL) AND
-- is a table (from pg_tables view definition)
-- or is a view (from pg_views view definition)
(dependee.relkind = 'r'::"char" OR dependee.relkind = 'v'::"char")
-- is a table, view or materialized view
(dependee.relkind = 'r'::"char" OR dependee.relkind = 'v'::"char"
OR dependee.relkind = 'm'::"char")
AND dependee.relnamespace = (
SELECT oid FROM pg_namespace WHERE nspname='public')
ORDER BY dependee.oid DESC;
Expand Down

0 comments on commit af1ceba

Please sign in to comment.