如何在db中有两个方案时显示PostgreSql中的所有表?

问题描述:

有2个计划在my_db。我需要显示scheme_one中所有表格的名称。怎么做?如何在db中有两个方案时显示PostgreSql中的所有表?

您可以使用PostgreSQL的information schema,像这样:

select table_name from information_schema.tables where table_schema = 'scheme_one';