Copy Data between different databases

Поиск
Список
Период
Сортировка
От Tim Semmelhaack
Тема Copy Data between different databases
Дата
Msg-id 003901d055bc$dfdc6540$9f952fc0$@gmx.de
обсуждение исходный текст
Ответы Re: Copy Data between different databases  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: Copy Data between different databases  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список pgsql-general
Hi,

I want to copy data between two servers (Version 9.1 and 9.4)

I've tried

psql -h host1 -U user1 -d db1  -f /q1.sql | psql -h host2 -U user2 -d db2 -f
/q2.sql

Both sql-scripts include the COPY (SELECT ...) TO STDOUT or COPY (SELECT
...) TO STDIN
As a result nothing is copied.

When I run a much simpler version of the query with the -c "Select .."
option it works. Because the sql-scripts are quite long, I don't to do it
without the -f option.

So where is the difference between the -c and the -f option?

Tim
-- Semmelhaack(at)gmx(dot).de




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

Предыдущее
От: Ramesh T
Дата:
Сообщение:
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Copy Data between different databases