Thread: Find clusters containing a schema?

Find clusters containing a schema?

From
Josh Trutwin
Date:
Is it possible to somehow query the system catalog to find out which
clusters/databases have a certain schema?

When running the query:

SELECT * FROM pg_catalog.pg_namespace WHERE nspname = 'myschema';

It always only finds data for the current session, not all clusters,
even when connected as postgres.

Thanks,

Josh

Re: Find clusters containing a schema?

From
Alvaro Herrera
Date:
Josh Trutwin wrote:
> Is it possible to somehow query the system catalog to find out which
> clusters/databases have a certain schema?

No, unless you connect to each database in turn.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.