X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 21A9BD834F for ; Wed, 31 Aug 2005 07:16:21 -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 76670-06 for ; Wed, 31 Aug 2005 10:16:15 +0000 (GMT) Received: from sharp.noc24x7.com (unknown [69.56.128.138]) by svr1.postgresql.org (Postfix) with ESMTP id F40C1D8347 for ; Wed, 31 Aug 2005 07:16:11 -0300 (ADT) Received: from [61.3.110.136] (helo=thenilgiris.web) by sharp.noc24x7.com with esmtp (Exim 4.52) id 1EAPdd-00036c-Vi for pgsql-sql@postgresql.org; Wed, 31 Aug 2005 15:46:14 +0530 Received: by thenilgiris.web (Postfix, from userid 500) id 49C285BA65; Wed, 31 Aug 2005 15:45:50 +0530 (IST) From: Kenneth Gonsalves To: pgsql-sql@postgresql.org Subject: Re: How do I copy part of table from db1 to db2 (and rename the columns)? Date: Wed, 31 Aug 2005 15:45:49 +0530 User-Agent: KMail/1.6.1 References: <1125482430.9456.6.camel@Panoramix> In-Reply-To: <1125482430.9456.6.camel@Panoramix> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200508311545.49846.lawgon@thenilgiris.com> X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sharp.noc24x7.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - thenilgiris.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.066 required=5 tests=[AWL=0.016, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/293 X-Sequence-Number: 22521 On Wednesday 31 Aug 2005 3:30 pm, Joost Kraaijeveld wrote: > Hi, > > 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... checkout dblink =2D-=20 regards kg http://www.livejournal.com/users/lawgon tally ho! http://avsap.org.in =E0=B2=87=E0=B2=82=E0=B2=A1=E0=B3=8D=E0=B2=B2=E0=B2=BF=E0=B2=A8=E0=B2=95=E0= =B3=8D=E0=B2=B8 =E0=AE=B5=E0=AE=BE=E0=AE=B4=E0=AF=8D=E0=AE=95!