1、获取postgres中定义表的名称与注释
select relname as TABLE_NAME ,col_description(c.oid, 0) as COMMENTS from pg_class c where relkind = 'r' and relname not like 'pg_%' and relname not like 'sql_%'
2、获取postgres中某个表中字段的定义信息
SELECT col_description(a.attrelid,a.attnum) as comment,a.attname as name FROM pg_class as c,pg_attribute as a where c.relname = '表名' and a.attrelid = c.oid and a.attnum>0