Re: Removing a schema

Поиск
Список
Период
Сортировка
От Nis Jørgensen
Тема Re: Removing a schema
Дата
Msg-id f99hbr$l0c$2@sea.gmane.org
обсуждение исходный текст
Ответ на Removing a schema  (Naz Gassiep <naz@mira.net>)
Ответы Take your postgresSql on the road, and live to tell of it.
Список pgsql-general
Naz Gassiep skrev:
> I'm trying to remove a schema and move all the tables to another schema.
> I've manually run alter table on every table to move them, however all
> the foreign keys still reference the old schema, and there are too many
> to do by hand.
>
> Is there an easy way to update one of the system catalogs to do this? I
> want to change every reference of that schema to point to the new one,
> and then drop the schema, but not drop any data.

I have done something like this

pg_dump old_schema in text format
create new schema
modify dump to set default schema to the new one
import dump with psql
drop old schema

Nis

В списке pgsql-general по дате отправления:

Предыдущее
От: Nis Jørgensen
Дата:
Сообщение: Re: finding reusable ids
Следующее
От: Geoffrey
Дата:
Сообщение: Re: backend process terminates