背景
原文链接:https://www.f2er.com/postgresql/192860.html在Postgresql中删除(或替换)对象时,如果存在依赖关系,则删除将失败(不指定CASCADE).
问题
示例解决方案
查询可能类似于:
SELECT * FROM information_schema i,pg_depend pd WHERE i.object_id = pd.object_id AND i.object_type = 'TABLE' AND i.object_schema = 'public' AND i.object_name = 'table_with_dependents';
这个消失是缺失的.
有关
> http://postgresql.1045698.n5.nabble.com/information-schema-problem-td2144069.html
> http://www.alberton.info/postgresql_meta_info.html
题