Re: Dealing with schema in psql utility?

From: Dan Delaney <ddelaney(at)powercreative(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Dealing with schema in psql utility?
Date: 2003-02-20 19:50:18
Message-ID: 89935828-450C-11D7-8BFA-000A27E2A402@powercreative.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday, February 20, 2003, at 02:23 PM, Tariq Muhammad wrote:
> select * from pg_namespace ;
> Fist get the oid of the schema that you want to get the table list for
> :
> select oid from pg_namespace where nspname = 'schema_name';
> select relname from pg_class where relnamespace = oid; ## above oid.
> update pg_namespace set nspname='new_schema_name' where
> nspname='schema_name';

You've got to be kidding ;-)

Seriously though, isn't the purpose of schemas to make organization of
tables more convenient? It seems like dealing with schemas is a big
hassle. It'd be nice to have something like "\d", except for schemas,
to list the schemas that you've created, and an "alter schema"
statement to modify them.

--Dan

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jonathan Bartlett 2003-02-20 19:52:31 Re: What is the quickest query in the database?
Previous Message Fabrizio Mazzoni 2003-02-20 19:42:44 Re: Removing spaces