Skip site navigation (1) Skip section navigation (2)

Re: Dump and Query

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Enrico <scotty(at)linuxtime(dot)it>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Dump and Query
Date: 2006-12-27 20:20:27
Message-ID: 20061227202027.GA10295@wolff.to (view raw or flat)
Thread:
Lists: pgsql-admin
On Wed, Dec 27, 2006 at 14:05:30 +0100,
  Enrico <scotty(at)linuxtime(dot)it> wrote:
> Is there any way to make a dump from a query?
> 
> For example if my query is:
> 
> select field1,field2 from table
> 
> Does it exist a shell command like pg_dump --QUERY myquery -f myfile?

In 8.2 you can use a query with the COPY command. Depending on what
you are really doing, that might be a solution for you.

In response to

pgsql-admin by date

Next:From: L BayukDate: 2006-12-28 00:43:28
Subject: 8.2.0 upgrade issue: postmaster -S
Previous:From: Rajesh Kumar MallahDate: 2006-12-27 17:47:43
Subject: Re: psql does not save contents into file at end of command.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group