select
a.attnum,
a.attname,
t.typname,
COALESCE(d.character_maximum_length, d.numeric_precision),
d.numeric_scale,
'' as key,
case when a.attnotnull = true
then '否'
else
'是'
end as notnull,
d.column_default,
col_description(a.attrelid,a.attnum) as comment
from
pg_class c,
pg_attribute a,
pg_type t,
information_schema."columns" d
where
a.attrelid = c.oid
and a.atttypid = t.oid
and a.attnum > 0
and c.relname = d.table_name
and d.column_name = a.attname
and c.relname = 'hth_wechat_withdraw';