Renaming tables to other schemas

From: ziga(at)ljudmila(dot)org
To: pgsql-hackers(at)postgresql(dot)org
Subject: Renaming tables to other schemas
Date: 2004-02-07 15:04:22
Message-ID: 52262.193.77.253.204.1076166262.squirrel@webmail.ljudmila.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

The following SQL works:

ALTER TABLE a.foo RENAME TO bar;

But the following doesn't:

ALTER TABLE a.foo RENAME TO b.bar;

The capability to move objects to other schemas
would be quite useful.

Apparently, everything works OK if you change
pg_class.relnamespace with UPDATE, but this is
not very nice.

Are there any problems to be expected with this that
I am missing and if not, would it make sense to support
changing schemas with ALTER TABLE?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hans-Jürgen Schönig 2004-02-07 17:27:41 Re: Aggregation question
Previous Message Merlin Moncure 2004-02-07 14:46:12 Re: [pgsql-hackers-win32] Sync vs. fsync during checkpoint