SELECT * FROM pg_attribute WHERE attrelid = ‘tablename’::regclass;–只查看字段名SELECT attname FROM pg_attribute WHERE attrelid = ‘tablename’::regclass;