列出postgresql中的所有表information_schema [英] List all tables in postgresql information_schema
问题描述
在PostgreSQL的information_schema中列出所有表的最佳方法是什么?
What is the best way to list all of the tables within PostgreSQL's information_schema?
要澄清一下:我正在使用一个空的DB(我没有添加任何自己的表),但是我想查看information_schema结构中的每个表。 / p>
To clarify: I am working with an empty DB (I have not added any of my own tables), but I want to see every table in the information_schema structure.
推荐答案
您应该可以只运行 select * from information_schema.tables
以获得由Postgres管理的特定数据库的每个表的列表。
You should be able to just run select * from information_schema.tables
to get a listing of every table being managed by Postgres for a particular database.
您还可以添加其中table_schema ='information_schema'
仅查看信息模式中的表。
You can also add a where table_schema = 'information_schema'
to see just the tables in the information schema.
这篇关于列出postgresql中的所有表information_schema的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!