Moving table from one schema to another

From: Walter Haslbeck <news(at)badblocks(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Moving table from one schema to another
Date: 2004-09-12 15:48:25
Message-ID: 9n7e12-fa1.ln1@butthole.homeunix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I want to move a table from one schema to another, but
'RENAME TABLE schema1.table1 TO schema2.table1' doesn't
work. Is there a better way than creating a new table with
'CREATE TABLE schema2.table1 AS SELECT * FROM schema1.table1'?

Oh, I'm using 7.4.5.

Walter

Browse pgsql-general by date

  From Date Subject
Next Message Nick 2004-09-12 16:16:37 Re: Auto increment/sequence on multiple columns?
Previous Message DU 2004-09-12 14:47:12 Fwd: Network problem