Re: Frustrated...pg_dump/restore

Поиск
Список
Период
Сортировка
От ries van Twisk
Тема Re: Frustrated...pg_dump/restore
Дата
Msg-id 81BCB1A0-F4B6-4FA6-946A-74EC06D0CF2B@rvt.dds.nl
обсуждение исходный текст
Ответ на Frustrated...pg_dump/restore  (Jeff Amiel <becauseimjeff@yahoo.com>)
Ответы Re: Frustrated...pg_dump/restore
Список pgsql-general
On Oct 6, 2008, at 9:11 AM, Jeff Amiel wrote:

>
> I performed a pg_dump on a database and created a new schema-only
> database to copy that data into.
>
> However trying to use psql -f to load the data in, I get a plethora
> of syntax errors including the dreaded "invalid command \N".
>
> I even tried to pipe the pg_dump results directly into the psql
> command....
>
> /usr/local/pgsql/bin/pg_dump -U  pgsql --data-only db1  | /usr/local/
> pgsql/bin/psql -U pgsql db2
>
> Same results.
>
> Why?
>
> using -d (switching to inserts instead of COPY) seems to work just
> fine but is so slow as to be unusable.
>
> Is the COPY pg_dump method useful at all in ANY situation?
>
> Do I have to do a pg_dump using a custom archive option and use
> pg_resore to make this work? (sounds silly to me).
>
> Any help would be appreciated.




I think you want top use pg_restore, the default of pg_dump is a
binary output and you cannot pipe it to psql

Ries








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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: postgres/postgis
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Frustrated...pg_dump/restore