pg库表名获取
select * from pg_tables where tablename=‘’
pg库列名和类型注释等获取
–获取字段名、类型、注释、是否为空:
SELECT col_description(a.attrelid,a.attnum) as comment,a.attname as name,format_type(a.atttypid,a.atttypmod) as type, a.attnotnull as notnull
FROM pg_class as c,pg_attribute as a where c.relname = ‘table_name’ and a.attrelid = c.oid and col_description(a.attrelid,a.attnum) is not null;