Skip to content

Commit

Permalink
[#3816] mv are not aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Oct 26, 2017
1 parent 8f5b2f3 commit e14cbe5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckanext/datastore/set_permissions.sql
Expand Up @@ -55,7 +55,10 @@ CREATE OR REPLACE VIEW "_table_metadata" AS
substr(md5(dependee.relname || COALESCE(dependent.relname, '')), 0, 17) AS "_id",
dependee.relname AS name,
dependee.oid AS oid,
dependent.relname AS alias_of
CASE WHEN dependee.relkind = 'm'::"char"
THEN NULL
ELSE dependent.relname
END AS alias_of
FROM
pg_class AS dependee
LEFT OUTER JOIN pg_rewrite AS r ON r.ev_class = dependee.oid
Expand Down

0 comments on commit e14cbe5

Please sign in to comment.