1、通过命令行查询 \d 数据库 —— 得到所有表的名字 \d 表名 —— 得到表结构 2、通过SQL语句查询 "select * from pg_tables" —— 得到当前db中所有表的信息(这里pg_tables是系统视图) "select tablename from pg_tables where schemaname='public'" —— 得到所有用户自定义表的名字(这里"tablenam