Re: Renaming tables to other schemas

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Rod Taylor <rbt(at)rbt(dot)ca>, Neil Conway <neilc(at)samurai(dot)com>
Cc: ziga(at)ljudmila(dot)org, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Renaming tables to other schemas
Date: 2004-02-20 15:13:00
Message-ID: 200402201013.01266.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sunday 15 February 2004 07:53, Rod Taylor wrote:
> On Sun, 2004-02-15 at 01:34, Neil Conway wrote:
> > ziga(at)ljudmila(dot)org writes:
> > > The capability to move objects to other schemas would be quite
> > > useful.
> >
> > I agree. It's not utterly-trivial to implement (for one thing, you
> > need to move any dependant objects like indexes to the new schema),
> > but some form of this functionality would be a useful thing to add,
> > IMHO.
>
> It's not that hard to do either (I've done about 100 tables by hand at
> this point).
>
> Anyway, this should be supported by all RENAME commands, not just ALTER
> TABLE.

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?

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2004-02-20 15:44:16 Re: Renaming tables to other schemas
Previous Message Richard Huxton 2004-02-20 15:07:24 Re: Missing TODO? EXPLAIN vs functions