Re: move table between schemas

Поиск
Список
Период
Сортировка
От Sean Davis
Тема Re: move table between schemas
Дата
Msg-id 264855a00812021813jdd32d12w8b75f5927f686b54@mail.gmail.com
обсуждение исходный текст
Ответ на move table between schemas  (Frank Bax <fbax@sympatico.ca>)
Ответы Re: move table between schemas  (Frank Bax <fbax@sympatico.ca>)
Список pgsql-novice
On Tue, Dec 2, 2008 at 8:55 PM, Frank Bax <fbax@sympatico.ca> wrote:
>
> Is it possible to move a table from one schema to another (in the same database)?
>
> The only way I can think of is to:
>        - backup table
>        - modify backup file
>        - restore from modified backup
>        - delete original table
>
> Is there a better/easier way?

ALTER TABLE name
    SET SCHEMA new_schema

http://www.postgresql.org/docs/current/static/sql-altertable.html


Hope that helps.

Sean

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

Предыдущее
От: Frank Bax
Дата:
Сообщение: move table between schemas
Следующее
От: "Greg Cocks"
Дата:
Сообщение: Seeking impressions on "The Postgresql Reference Manual" - Volumes 1, 2 & 3