Re: Pg_dump Query - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Pg_dump Query
Date
Msg-id CAOR=d=3hH8poDHtXqKCYsiUi+HPR1RsvFMTHjQ6u2D+HqdD40w@mail.gmail.com
Whole thread Raw
In response to Pg_dump Query  (Rebecca Clarke <rebecca@clarke.net.nz>)
List pgsql-general
On Mon, Aug 15, 2011 at 6:10 AM, Rebecca Clarke <rebecca@clarke.net.nz> wrote:
> Hi
> I want to pg_dump only a select amount of rows from a table and restore them
> to a table on another server.
> Is there away to do this? I thought of using a view but how would I upload
> that into a specific table.  Copy? or is there something I can do with
> pg_restore.

You want to combine copy and select like so:

copy (select * from table where ...) to stdout;

pgsql-general by date:

Previous
From: Rebecca Clarke
Date:
Subject: Pg_dump Query
Next
From: Merlin Moncure
Date:
Subject: Re: Using Postgresql as application server