Re: Renaming tables to other schemas
От
Rod Taylor
Тема
Re: Renaming tables to other schemas
Дата
Msg-id
1077291855.25444.263.camel@jester
Ответ на
Re: Renaming tables to other schemas (Robert Treat)
Список
Дерево обсуждения
Renaming tables to other schemas ziga@ljudmila.org
Re: Renaming tables to other schemas Neil Conway <neilc@samurai.com>
Re: Renaming tables to other schemas Rod Taylor <rbt@rbt.ca>
Re: Renaming tables to other schemas Bruce Momjian <pgman@candle.pha.pa.us>
Re: Renaming tables to other schemas Robert Treat <xzilla@users.sourceforge.net>
Re: Renaming tables to other schemas Rod Taylor <pg@rbt.ca>
> Rod, can you lay out some psdueo code / logic involved in the process? I'm > guessing you lock the entry in pg_class, you up dependent objects, lock them, > update them all... is there more to it? It was one an offline database at the time with only a single user -- so locking wasn't a concern at the time. To change the namespace of a table, update the namespace ID for: pg_class -> of table pg_type -> of table pg_class -> index(es) on table pg_type -> of indexes on table pg_constraint -> all constraints on table pg_depend -> dependencies of above objects on the namespace We didn't have inheritance or the more exotic items, but I seem to recall the views continued to work as expected with no changes. Dump and restore gave us what we expected, and the database functions as expected but that doesn't necessarily mean the above covers all items.
В списке pgsql-hackers по дате отправления