Re: Upgrading 8.2 to 8.4: pg_restore: did not find magic string in file header\n

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Upgrading 8.2 to 8.4: pg_restore: did not find magic string in file header\n
Дата
Msg-id 2869.1290189251@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Upgrading 8.2 to 8.4: pg_restore: did not find magic string in file header\n  (Adrian Klaver <adrian.klaver@gmail.com>)
Ответы Re: Upgrading 8.2 to 8.4: pg_restore: did not find magic string in file header\n  (Adrian Klaver <adrian.klaver@gmail.com>)
Список pgsql-general
Adrian Klaver <adrian.klaver@gmail.com> writes:
> On Friday 19 November 2010 8:29:38 am Tom Lane wrote:
>> It sounds like you're trying to use pg_restore on a plain-text (SQL
>> script) dump file.  Run it through psql, instead.

> Out of curiosity what would trigger this? When I have tried to run a
> plain text file through pg_restore I get:

> aklaver@tucker:~$ pg_restore -d test -U postgres test.sql
> pg_restore: [archiver] input file does not appear to be a valid archive

Yeah, that's what you get if you let pg_restore try to determine the
file type.  If you tell it you know that the file is an archive (-Fc)
then it believes you, and you get the lower-level failure.

I'm not real sure why we honor -Fc and -Ft in pg_restore anyway;
skipping the file type check couldn't possibly save enough to be
worth the trouble ...

            regards, tom lane

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

Предыдущее
От: Jon Nelson
Дата:
Сообщение: Regarding EXPLAIN and width calculations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Regarding EXPLAIN and width calculations