Re: Dealing with schema in psql utility?
От | Tariq Muhammad |
---|---|
Тема | Re: Dealing with schema in psql utility? |
Дата | |
Msg-id | Pine.LNX.4.21.0302201411590.15424-100000@genesis.int.libertyrms.com обсуждение исходный текст |
Ответ на | Dealing with schema in psql utility? (Dan Delaney <ddelaney@powercreative.com>) |
Ответы |
Re: Dealing with schema in psql utility?
Re: Dealing with schema in psql utility? |
Список | pgsql-general |
On Thu, 20 Feb 2003, Dan Delaney wrote: > 1) get a list of the schema that have been created in the current > database select * from pg_namespace ; > 2) View the list of tables in a schema other than "public"? 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'; then select relname from pg_class where relnamespace = oid; ## above oid. > 3) Rename a schema (is there an "alter schema" statement)? You can do it as superuser update pg_namespace set nspname='new_schema_name' where nspname='schema_name'; _/_/ _/_/ _/_/ Tariq Muhammad _/ _/ _/ _/ _/ _/ tariq@libertyrms.info _/ _/ _/_/_/ _/_/_/ v:416-646-3304 x 111 _/ _/ _/ _/ _/ _/ c:416-455-0272 _/_/_/ _/_/_/ _/ _/ p:416-381-1457 _________________________________________________ Liberty Registry Management Services Co.
В списке pgsql-general по дате отправления: