SELECT table_name FROM information_schema.tables WHERE table_type = 'BASE TABLE' AND table_schema NOT IN ('pg_catalog','information_schema'); SELECT column_name FROM information_schema.columns WHERE table_name = 'YourTablesName';
该页面有一些关于从information_schema:http://www.alberton.info/postgresql_meta_info.html检索信息的好消息