X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 424EB9FB296 for ; Wed, 3 May 2006 19:49:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 07666-02 for ; Wed, 3 May 2006 19:34:24 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from projects.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 03A1C9FB1DE for ; Wed, 3 May 2006 19:34:23 -0300 (ADT) Received: from [192.168.1.50] (or-67-76-146-141.sta.sprint-hsd.net [67.76.146.141]) (authenticated bits=0) by projects.commandprompt.com (8.13.4/8.13.4) with ESMTP id k43MYKJb005431; Wed, 3 May 2006 15:34:25 -0700 Message-ID: <44592FE9.1000005@commandprompt.com> Date: Wed, 03 May 2006 15:34:17 -0700 From: "Joshua D. Drake" Organization: Command Prompt, Inc. User-Agent: Mail/News 1.5 (X11/20060309) MIME-Version: 1.0 To: "[S] Dhandapani" CC: pgsql-admin@postgresql.org Subject: Re: Help on restoration References: <4459232A.6090104@sifycorp.com> In-Reply-To: <4459232A.6090104@sifycorp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (projects.commandprompt.com [192.168.2.159]); Wed, 03 May 2006 15:34:26 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/33 X-Sequence-Number: 21565 [S] Dhandapani wrote: > Hi, > > How to take dump based of condition i.e using where clauses in postgres? > > For example i want to take dump of 1 week data from my table y and > import that 1 week data in to the same table after truncating the table > > my table name is y having field name date and my query is of select > * from y where date >'2006-04-12'; > CREATE TABLE foo as SELECT * FROM y WHERE data > '2006-04-12';COPY Y TO '/tmp/y'; Joshua D. Drake > how should i import the data taken using select statement using where > condition in postgres. > > > Regards, > Dhandapani. > ********** DISCLAIMER ********** > Information contained and transmitted by this E-MAIL is proprietary to > Sify Limited and is intended for use only by the individual or entity to > which it is addressed, and may contain information that is privileged, > confidential or exempt from disclosure under applicable law. If this is > a forwarded message, the content of this E-MAIL may not have been sent > with the authority of the Company. If you are not the intended > recipient, an agent of the intended recipient or a person responsible > for delivering the information to the named recipient, you are notified > that any use, distribution, transmission, printing, copying or > dissemination of this information in any way or in any manner is > strictly prohibited. If you have received this communication in error, > please delete this mail & notify us immediately at admin@sifycorp.com > > Watch India vs. England LIVE, Hot videos and more only on Sify Max! > Click Here. www.sifymax.com > > Get to see what's happening in your favourite City on Bangalore Live! > www.bangalorelive.in > > > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faq > -- === The PostgreSQL Company: Command Prompt, Inc. === Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240 Providing the most comprehensive PostgreSQL solutions since 1997 http://www.commandprompt.com/