Re: move table between schemas

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: move table between schemas
Date: 2008-12-03 15:31:22
Message-ID: 4936A64A.2030203@sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sean Davis wrote:
> On Tue, Dec 2, 2008 at 8:55 PM, Frank Bax <fbax(at)sympatico(dot)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.

Yes, very much so; thanks!

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruce Momjian 2008-12-03 23:24:10 Re: Seeking impressions on "The Postgresql Reference Manual" - Volumes 1, 2 & 3
Previous Message Gal Waldman 2008-12-03 11:48:27 init script