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 585CD3A3B6A for ; Tue, 16 Nov 2004 11:59:23 +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 89024-06 for ; Tue, 16 Nov 2004 11:59:11 +0000 (GMT) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50]) by svr1.postgresql.org (Postfix) with ESMTP id 675743A3B60 for ; Tue, 16 Nov 2004 11:59:12 +0000 (GMT) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id iAGCU95x005592; Tue, 16 Nov 2004 14:30:09 +0200 Received: from localhost (achill@localhost) by matrix.gatewaynet.com (8.12.8/8.12.8/Submit) with ESMTP id iAGCU9w1005588; Tue, 16 Nov 2004 14:30:09 +0200 Date: Tue, 16 Nov 2004 14:30:09 +0200 (EET) From: Achilleus Mantzios To: Andrew Sullivan Cc: pgsql-sql@postgresql.org Subject: Re: Move table between schemas In-Reply-To: <20041116110538.GA15247@phlogiston.dyndns.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT 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/142 X-Sequence-Number: 19461 O Andrew Sullivan έγραψε στις Nov 16, 2004 : > 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. What about indexes, constraints, sequences,etc...??? > > A > > -- -Achilleus