-- 查出哪些表有 phone 字段
select a.relname 表名,b.attname 字段名,c.typname 字段类型
from pg_class a,pg_attribute b,pg_type c
where a.oid=b.attrelid
and b.atttypid=c.typelem
and b.attname~'phone'
and b.attnum>0
and b.attisdropped = 'f';
-- 查出哪些表有 phone 字段
select a.relname 表名,b.attname 字段名,c.typname 字段类型
from pg_class a,pg_attribute b,pg_type c
where a.oid=b.attrelid
and b.atttypid=c.typelem
and b.attname~'phone'
and b.attnum>0
and b.attisdropped = 'f';