PostgreSQL中,如何查表属于哪个数据库

时间:2023-03-08 16:31:54
db1=# \x
Expanded display is on.
db1=# SELECT * FROM information_schema.tables WHERE table_name='tab100';
-[ RECORD 1 ]----------------+-----------
table_catalog | db1
table_schema | public
table_name | tab100
table_type | BASE TABLE
self_referencing_column_name |
reference_generation |
user_defined_type_catalog |
user_defined_type_schema |
user_defined_type_name |
is_insertable_into | YES
is_typed | NO
commit_action | db1=# \x
Expanded display is off.
db1=#