Re: Move a table to another schema

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Lee Kindness <lkindness(at)csl(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Move a table to another schema
Date: 2003-11-17 17:24:28
Message-ID: 20031117172428.GD3758@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 17, 2003 at 04:05:04PM +0000, Lee Kindness wrote:
> I have many tables created in the "public" schema and I would like to
> migrate these into an "x001" schema. Unfortunately there is no ALTER
> TABLE construct for this... The following SQL would seem to move the
> "zxc" table from "public.zxc" to "x001.zxc":

You have to move all indexes, constraints, the type, etc too.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"There was no reply" (Kernel Traffic)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message kdebisschop 2003-11-17 17:25:40 Re: Alternative cluster location
Previous Message Peter Eisentraut 2003-11-17 16:11:32 Re: Alternative cluster location