Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 87E788E3529 for ; Sat, 3 Mar 2012 10:17:20 -0400 (AST) Received: from fuse-dedicated-74-83-143-254.fuse.net ([74.83.143.254] helo=relay.beechglen.com) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S3plv-0002JB-0x for pgsql-admin@postgresql.org; Sat, 03 Mar 2012 14:17:19 +0000 Received: from [192.168.78.110] (cpe-65-27-192-234.cinci.res.rr.com [65.27.192.234]) (authenticated bits=0) by relay.beechglen.com (8.13.8/8.13.8) with ESMTP id q23EH3YR014228 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 3 Mar 2012 09:17:04 -0500 References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <5E065B94-763E-4CEF-B235-6E6632CDF35C@beechglen.com> Cc: "pgsql-admin@postgresql.org" X-Mailer: iPhone Mail (9A405) From: davidh Subject: Re: Restoring selected records from backup file Date: Sat, 3 Mar 2012 09:17:02 -0500 To: Piyush Lenka X-Pg-Spam-Score: -0.9 (/) X-Archive-Number: 201203/12 X-Sequence-Number: 39200 The only way I know of doing this is to restore the backup to a separate dat= abase or table and doing a "SELECT INTO" statement. The only caveat is that y= ou need to make sure you delete the outdated records from the prod table. To= do this you may have to temporarily disable foreign key enforcing.=20 David.=20 On Mar 2, 2012, at 5:19 AM, Piyush Lenka wrote: > hi, >=20 > 1. How can we restore selected records from a plain text backup (backup.sq= l). > 2. Is it possible using psql. If yes how > Please Help >=20 > Thanks & Regards=20 > Piyush