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

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: copy data from one db into another via copy & psql
Дата
Msg-id ht8c2j$8ik$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на copy data from one db into another via copy & psql  (Kevin Kempter <kevink@consistentstate.com>)
Список pgsql-general
On 2010-05-21, 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?

Yes.

  COPY ... TO stdout;

at the source and

  COPY ... FROM stdin;

at the destination.



I use this with the

  COPY ( query ) TO  STDOUT ;

syntax when I want to copy only a few rows.



В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Is postgres installed?
Следующее
От: Deepa Thulasidasan
Дата:
Сообщение: Help reqd on azimuth finction