Re: copy data from one db into another via copy & psql - Mailing list pgsql-general

From Scott Marlowe
Subject Re: copy data from one db into another via copy & psql
Date
Msg-id AANLkTikk6uHeJOB3AERiiBVdljr0GRCvtHX4-TTrPFxR@mail.gmail.com
Whole thread Raw
In response to copy data from one db into another via copy & psql  (Kevin Kempter <kevink@consistentstate.com>)
List pgsql-general
On Thu, May 20, 2010 at 10:59 PM, Kevin Kempter
<kevink@consistentstate.com> wrote:
> Can I copy from one db (via COPY) and pipe the results to a psql/COPY stmt so
> I can load the data into a table in the second db 'inline' without writing to
> & reading from a flat file?

That's pretty much what

pg_dump -t tablename -d dbname | psql dbname

does.  Add a -a and it's data only:

pg_dump -a -t tablename -d dbname | psql dbname

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: copy data from one db into another via copy & psql
Next
From: Craig Ringer
Date:
Subject: Re: How feasible is this?