Re: Move a table to another schema

Поиск
Список
Период
Сортировка
От Lee Kindness
Тема Re: Move a table to another schema
Дата
Msg-id 16313.58030.741345.972265@kelvin.csl.co.uk
обсуждение исходный текст
Ответ на Move a table to another schema  (Lee Kindness <lkindness@csl.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Alex
Дата:
Сообщение: Quoting Problem in PLPGSQL
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: how to get historical data?