postgresql如何查询所有表信息

获取当前db中所有的表信息:

select * from pg_tables;

用户自定义的表,如果未经特殊处理,默认都是放在名为public的schema下

select tablename from pg_tables where schemaname='public'
postgres=# select tablename from pg_tables where schemaname='public';
 tablename
-----------
 tb_test
(1 行记录)

推荐:PostgreSQL教程

来源:PY学习网:原文地址:https://www.py.cn/article.html

hmoban主题是根据ripro二开的主题,极致后台体验,无插件,集成会员系统
自学咖网 » postgresql如何查询所有表信息