我找到了一百万个关于如何设置 Autovacuum 配置设置的示例,但似乎无法找到如何列出当前配置。
Postgres 9.1 是我最感兴趣的版本。
我可以使用列出所有模式中的所有表
> \dt *.*
Run Code Online (Sandbox Code Playgroud)
但这也列出了远远超过我关心的表的系统表。我想要我在公共模式和我定义的任何模式中创建的所有表(可能还有视图)。
我希望找到一种方法来做到这一点,而不必在我创建它们时将模式显式添加到搜索路径中,如下所述:
编辑:
根据接受的答案,我创建了以下视图:
create view my_tables as
select table_catalog, table_schema, table_name, table_type
from information_schema.tables
where table_schema not in ('pg_catalog', 'information_schema');
Run Code Online (Sandbox Code Playgroud)
现在下面的命令给了我我想要的:
select * from my_tables;
Run Code Online (Sandbox Code Playgroud)