表greenplum数据库中缺少分发密钥

时间:2018-08-19 20:02:34

标签: greenplum

需要查询以在Greenplum的数据库中查找没有分发键创建的表。

1 个答案:

答案 0 :(得分:0)

select n.nspname,
    c.relname
from pg_class c
join pg_namespace n on c.relnamespace = n.oid
join gp_distribution_policy d on c.oid = d.localoid
where c.relkind = 'r'
and d.attrnums is null;