Re: transfering tables into other schema

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: transfering tables into other schema
Дата
Msg-id dcc563d10902170009u2acd3e1aw8380e3662de5130c@mail.gmail.com
обсуждение исходный текст
Ответ на transfering tables into other schema  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Ответы Re: transfering tables into other schema  (Raymond O'Donnell <rod@iol.ie>)
Re: transfering tables into other schema  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
On Tue, Feb 17, 2009 at 12:34 AM, Ivan Sergio Borgonovo
<mail@webthatworks.it> wrote:
> 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).

Have you tried

ALTER TABLE name SET SCHEMA new_schema;

???

Should just work with no real downtime.

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

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: transfering tables into other schema
Следующее
От: Schwaighofer Clemens
Дата:
Сообщение: Strange Grant behavior in postgres 8.3