Re: Move a table to another schema - Mailing list pgsql-general

From Lee Kindness
Subject Re: Move a table to another schema
Date
Msg-id 16313.58030.741345.972265@kelvin.csl.co.uk
Whole thread Raw
In response to Move a table to another schema  (Lee Kindness <lkindness@csl.co.uk>)
List pgsql-general
Shridhar,

Shridhar Daithankar writes:
 > 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":
 >
 > Why not just rename the schema itself? You can recreate a public
 > schema later..:-)
 >
 > Simple, isn't it? (Unless public is a specieal schema)

Thanks Shridhar - it's good when someone has a different angle on
things!

Of course I'm using 7.3, so there is no ALTER SCHEMA - but the
catalogue magic required to rename a single schema will be a lot less
than renaming 100s of tables, indices and views!

L.

pgsql-general by date:

Previous
From: Alex
Date:
Subject: Quoting Problem in PLPGSQL
Next
From: Peter Eisentraut
Date:
Subject: Re: how to get historical data?