Re: copy data from one db into another via copy & psql

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: copy data from one db into another via copy & psql
Дата
Msg-id AANLkTikk6uHeJOB3AERiiBVdljr0GRCvtHX4-TTrPFxR@mail.gmail.com
обсуждение исходный текст
Ответ на copy data from one db into another via copy & psql  (Kevin Kempter <kevink@consistentstate.com>)
Список 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 по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: copy data from one db into another via copy & psql
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: How feasible is this?