psql查询某个表的列名:

select column_name from information_schema.columns where table_name='xx' and table_schema=''public;