Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D23861337B9D for ; Tue, 5 Oct 2010 15:32:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 83144-01 for ; Tue, 5 Oct 2010 18:32:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailgate.iii.com (mailgate.iii.com [205.227.88.3]) by mail.postgresql.org (Postfix) with ESMTP id 130B51337B92 for ; Tue, 5 Oct 2010 15:32:31 -0300 (ADT) Received: from mailhub.iii.com (mailhub [10.1.2.3]) by mailgate.iii.com (8.13.6/8.13.6) with ESMTP id o95IPNfU019458; Tue, 5 Oct 2010 11:25:23 -0700 (PDT) Received: from [10.1.7.210] ([10.1.7.210]) by mailhub.iii.com (8.13.6/8.13.6) with ESMTP id o95IZLQ3011957; Tue, 5 Oct 2010 11:35:21 -0700 (PDT) Message-ID: <4CAB6F3D.3000706@iii.com> Date: Tue, 05 Oct 2010 11:32:29 -0700 From: Dinesh Bhandary Reply-To: dbhandary@iii.com Organization: Innovative Interfaces User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-admin@postgresql.org Subject: Re: restore References: <4CAB698B.4040402@iii.com> <4CAB24F40200002500036550@gw.wicourts.gov> In-Reply-To: <4CAB24F40200002500036550@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/46 X-Sequence-Number: 35787 Awesome, this will work. It won't retain the column name in insert into statement. I was not sure if this will work with postgres 8.2.5 but it does. Thanks. Dinesh On 10/5/2010 11:15 AM, Kevin Grittner wrote: > Dinesh Bhandary wrote: > >> Is there an easy way to restore to a new table where the column >> name have been changed but data remains the same? > > Restore to the old name and then rename the column? > > Access the backup file and change the COPY statement to the new > column name? > > If you can redo the dump, you don't mind the load running a little > slower, and the column order is the same -- dump with the --inserts > switch? > > -Kevin > > >