X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 08DB43A2B17 for ; Tue, 16 Nov 2004 11:05:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71488-10 for ; Tue, 16 Nov 2004 11:05:39 +0000 (GMT) Received: from smtp102.rog.mail.re2.yahoo.com (smtp102.rog.mail.re2.yahoo.com [206.190.36.80]) by svr1.postgresql.org (Postfix) with SMTP id C461D3A2B0C for ; Tue, 16 Nov 2004 11:05:40 +0000 (GMT) Received: from unknown (HELO phlogiston.dydns.org) (a.sullivan@rogers.com@65.49.125.184 with login) by smtp102.rog.mail.re2.yahoo.com with SMTP; 16 Nov 2004 11:05:40 -0000 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id E799B4104; Tue, 16 Nov 2004 06:05:38 -0500 (EST) Date: Tue, 16 Nov 2004 06:05:38 -0500 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: Move table between schemas Message-ID: <20041116110538.GA15247@phlogiston.dyndns.org> Mail-Followup-To: pgsql-sql@postgresql.org References: <20041116100234.635fcd7e@kingfisher.intern.logi-track.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041116100234.635fcd7e@kingfisher.intern.logi-track.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/140 X-Sequence-Number: 19459 On Tue, Nov 16, 2004 at 10:02:34AM +0100, Markus Schaber wrote: > Hello, > > Is there an easy way to move a table to another schema in PostgreSQL 7.4? > > ALTER TABLE and ALTER SCHEMA don't have this options. CREATE TABLE newschema.newtable AS SELECT * FROM oldschema.oldtable oughta work. A -- Andrew Sullivan | ajs@crankycanuck.ca When my information changes, I alter my conclusions. What do you do sir? --attr. John Maynard Keynes