# 查某个表的所有字段名
SELECT
c.relname as table_name,
a.attname as field_name
FROM pg_class as c,pg_attribute as a
where a.attrelid = c.oid and a.attnum>0
and c.relname='t_rate_configure'
group by c.relname,a.attname
order by 1;
# 查某个表的所有字段名&字段类型&注释
SELECT
a.attname as name,
format_type(a.atttypid,a.atttypmod) as type,
col_description(a.attrelid,a.attnum) as comment,
a.attnotnull as notnull
FROM pg_class as c,pg_attribute as a
where c.relname = 't_rate_configure'
and a.attrelid = c.oid and a.attnum>0;