How move a referenced table between schemas?

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: How move a referenced table between schemas?
Date: 2009-07-13 02:41:48
Message-ID: 4A5A9EEC.5000000@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
how can I move a table from one schema to another even though it is
referenced by foreign keys?

Cloning the table and the manually recreating every reference shouldn't
be the only way, or is it? :(

How can I dump/export every reference on a table?
Until now I call DROP TABLE and look in the error message for the
referencing tables. There must be a more elegant way, I hope. ;)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-07-13 02:45:41 Re: How move a referenced table between schemas?
Previous Message Andreas 2009-07-13 01:10:49 Design question: Should "postgres" own all the db objects?