select datname from pg_database;
SELECT table_name FROM information_schema.tables WHERE table_schema = ‘public‘;
SELECT column_name FROM information_schema.columns WHERE table_name =‘pda_ub_tips‘;
查看库名、表名、字段
原文:http://www.cnblogs.com/fsgblog/p/5523237.html