获取postgresql字段信息

SELECT col_description(a.attrelid,a.attnum) as comment,format_type(a.atttypid,a.atttypmod) as type,a.attname as name, a.attnotnull as notnull  

FROM pg_class as c,pg_attribute as a  

where c.relname = 'mc_log_app' and a.attrelid = c.oid and a.attnum>0  



你可能感兴趣的:(PostgreSQL)