pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jyoti Seth <jyotiseth2001@gmail.com>
To: 'Jasen Betts' <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: backup
Date: Wed, 10 Jun 2009 11:16:35 +0530
Message-ID: <001c01c9e98e$d4421c20$7cc65460$@com> (raw)
In-Reply-To: <h0lkq8$90o$7@reversiblemaps.ath.cx>
References: <003b01c9e8e8$29f09860$7dd1c920$@com>
	<h0lkq8$90o$7@reversiblemaps.ath.cx>

Thanks it worked when I changed the command '/copy' to '\copy'

-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Jasen Betts
Sent: Tuesday, June 09, 2009 6:03 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] backup

On 2009-06-09, Jyoti Seth <jyotiseth2001@gmail.com> wrote:
> This is a multipart message in MIME format.
>
> ------=_NextPart_000_003C_01C9E916.43A8D460
> Content-Type: text/plain;
> 	charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> Hi all,
>
>  
>
> Can we take backup of specific data of a table (using where clause)?

in psql:

/copy (select * from table WHERE condition ) to 'FILENAME'

requires postgres version >= 8.2 IIRC.

you can use any query.

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql




view thread (10+ messages)  latest in thread

Message-ID: <001c01c9e98e$d4421c20$7cc65460$@com>
Permalink:  ../001c01c9e98e$d4421c20$7cc65460$@com/
Also on:    postgresql.org/message-id/001c01c9e98e$d4421c20$7cc65460$@com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jyotiseth2001@gmail.com, jasen@xnet.co.nz
  Subject: Re: backup
  In-Reply-To: <001c01c9e98e$d4421c20$7cc65460$@com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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