Re: Looking for a command to list schemas

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Looking for a command to list schemas
Date: 2005-10-26 14:32:55
Message-ID: 20051026143255.GA24837@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 26, 2005 at 03:35:31PM +0200, Andreas Kretschmer wrote:
> Cosmopo <tempo(at)marquo(dot)com> schrieb:
> > It seems that once we created the schema and created a table with this
> > schema, if we forget about it, the is no way to list the schema or to
> > have the tables/sequence with it's associated schema...
> >
> > Can someone tell us how we can get this important info?
>
> \dn in psql list all schemas.

The poster mentioned 7.3.4 -- that version's psql didn't have \dn,
so using it results in the following error:

test=> \dn
Did not find any relation named "n".

You can get the list of schemas by querying the system catalogs:

SELECT * FROM pg_namespace;

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Emi Lu 2005-10-26 14:33:21 Where is the webaddress for the most recent postgresql version?
Previous Message Claire McLister 2005-10-26 14:29:30 Re: Map of Postgresql Users (OT)