skywalka
skywalka

Reputation: 21

Find hidden Postgres tables

I'm pretty new to postgres and I know that a \dt will show up the tables, `dtIs` will show tables and indexes but I'm looking for how to show/find hidden tables if any?

Upvotes: 2

Views: 6012

Answers (1)

Erwin Brandstetter
Erwin Brandstetter

Reputation: 659197

To find tables in any schema of a database, you could check the catalog table pg_class

SELECT oid::regclass AS table_name
FROM   pg_class
WHERE  relname = 'my_table_name'
AND    relkind = 'r';

Note, this includes "invisible" tables, that are not in your search_path, and even temporary tables from other sessions that you cannot access at all. There are no other "hidden" tables.

Tables in other databases of the same cluster are not included.

Upvotes: 3

Related Questions