X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8BB05D6E21; Wed, 31 Aug 2005 07:40:17 -0300 (ADT) 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 91918-05; Wed, 31 Aug 2005 10:40:13 +0000 (GMT) Received: from isis.sigpipe.cz (fw.sigpipe.cz [62.245.70.224]) by svr1.postgresql.org (Postfix) with ESMTP id 83390D8421; Wed, 31 Aug 2005 07:40:09 -0300 (ADT) Received: by isis.sigpipe.cz (Postfix, from userid 1001) id 497291F87BF1; Wed, 31 Aug 2005 12:40:11 +0200 (CEST) Date: Wed, 31 Aug 2005 12:40:11 +0200 From: Roman Neuhauser To: Joost Kraaijeveld Cc: Pgsql-sql@postgresql.org, Pgsql-General Subject: Re: How do I copy part of table from db1 to db2 (and rename the columns)? Message-ID: <20050831104011.GB74859@isis.sigpipe.cz> Mail-Followup-To: Joost Kraaijeveld , Pgsql-sql@postgresql.org, Pgsql-General References: <1125482430.9456.6.camel@Panoramix> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1125482430.9456.6.camel@Panoramix> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.277 required=5 tests=[AWL=-0.428, FORGED_RCVD_HELO=0.05, RCVD_IN_NJABL_DUL=1.655] X-Spam-Level: * X-Archive-Number: 200508/1563 X-Sequence-Number: 82971 # J.Kraaijeveld@Askesis.nl / 2005-08-31 12:00:30 +0200: > I want to copy several columns of a source table from db1 to db2, and > create the target table and rename the columns in the process. > > Is that possible in PostgresQL? If so, an example or url for such a > command /script would be appreciated... check these man pages: pg_dump(1), pg_restore(1), alter_table(7) -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991