PostgreSQLでカラム属性を見たいときは、つぎのようにすれば良い。ただし、table_nameは対象となるテーブルの名前。
select attname, atttypid, attlen
from pg_attribute
where attnum > 0
and attrelid = (select relfilenode from pg_class where relname = ‘table_name’)
order by attnum;
from pg_attribute
where attnum > 0
and attrelid = (select relfilenode from pg_class where relname = ‘table_name’)
order by attnum;