From: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
---|---|
To: | Jyoti Seth <jyotiseth2001(at)gmail(dot)com> |
Cc: | Jasen Betts <jasen(at)xnet(dot)co(dot)nz>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: backup |
Date: | 2009-06-10 05:50:28 |
Message-ID: | 65937bea0906092250g56700350pc869bc43ddffc2bf@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
It should be \copy . This is a psql command; if you have direct access to
database host machine, you might want to use the SQL command COPY for it's
performance.
http://www.postgresql.org/docs/8.3/interactive/app-psql.html
http://www.postgresql.org/docs/8.3/interactive/sql-copy.html
Best regards,
On Wed, Jun 10, 2009 at 10:38 AM, Jyoti Seth <jyotiseth2001(at)gmail(dot)com>wrote:
> I tried using /copy command. It is not giving any error but also not
> creating any file.
>
> Thanks
> Jyoti
>
> -----Original Message-----
> From: pgsql-sql-owner(at)postgresql(dot)org [mailto:
> pgsql-sql-owner(at)postgresql(dot)org]
> On Behalf Of Jasen Betts
> Sent: Tuesday, June 09, 2009 6:03 PM
> To: pgsql-sql(at)postgresql(dot)org
> Subject: Re: [SQL] backup
>
> On 2009-06-09, Jyoti Seth <jyotiseth2001(at)gmail(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
--
Lets call it Postgres
EnterpriseDB http://www.enterprisedb.com
gurjeet[(dot)singh](at)EnterpriseDB(dot)com
singh(dot)gurjeet(at){ gmail | hotmail | indiatimes | yahoo }.com
Mail sent from my BlackLaptop device
From | Date | Subject | |
---|---|---|---|
Next Message | Abbas | 2009-06-10 06:02:51 | Re: backup |
Previous Message | Jyoti Seth | 2009-06-10 05:46:35 | Re: backup |