pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Help on restoration
2+ messages / 2 participants
[nested] [flat]

* Help on restoration
@ 2006-05-03 21:39  [S] Dhandapani <dhandapani_s@sifycorp.com>
  0 siblings, 1 reply; 2+ messages in thread

From: [S] Dhandapani @ 2006-05-03 21:39 UTC (permalink / raw)
  To: pgsql-admin

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';

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Help on restoration
@ 2006-05-03 22:34  Joshua D. Drake <jd@commandprompt.com>
  parent: [S] Dhandapani <dhandapani_s@sifycorp.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Joshua D. Drake @ 2006-05-03 22:34 UTC (permalink / raw)
  To: [S] Dhandapani <dhandapani_s@sifycorp.com>; +Cc: pgsql-admin

[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/





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-05-03 22:34 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-03 21:39 Help on restoration [S] Dhandapani <dhandapani_s@sifycorp.com>
2006-05-03 22:34 ` Joshua D. Drake <jd@commandprompt.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox