transfering tables into other schema

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема transfering tables into other schema
Дата
Msg-id 20090217083416.5a89dd62@dawn.webthatworks.it
обсуждение исходный текст
Ответы Re: transfering tables into other schema  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
I've around 150-200 tables in the same schema.
Some of them have pk/fk relationships and are referenced into
functions (~20).

One of them is surely referenced by most of those 20 and it is the
largest.

I'd like to move all the 200 tables to a new schema and leave that
one in the public schema.

The DB size accordingly to select pg_size_pretty(pg_database_size is
1.5Gb

I can afford 1 day down (WE).

I was wondering what would be the "cheapest" and safest way to do
the above without making a mess of the relationships, constraints,
functions considering... I can afford one day down.

Of course running a well crafted set of SQL statement may do...
But sed and plain text backup may do as well.

Any other options?
Any advices on how to procede once an option is the clear winner?

thanks

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


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

Предыдущее
От: "Brent Wood"
Дата:
Сообщение: Re: Update table with random values from another table
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: transfering tables into other schema