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_classas c,
pg_attributeas a
where c.relname ='persons'
and a.attrelid =c.oid
and a.attnum >0
网友评论