Re: pg_restore has problems with restoring sequences.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_restore has problems with restoring sequences.
Дата
Msg-id 18202.1517768169@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_restore has problems with restoring sequences.  (robert <robert@redcor.ch>)
Ответы Re: pg_restore has problems with restoring sequences.  (robert <robert@redcor.ch>)
Re: pg_restore has problems with restoring sequences.  (robert <robert@redo2oo.ch>)
Список pgsql-admin
robert <robert@redcor.ch> writes:
> pg_restore: [archiver (db)] Error while PROCESSING TOC:
> pg_restore: [archiver (db)] Error from TOC entry 1068; 1259 142848 SEQUENCE
> change_email_domain_id_seq odoo
> pg_restore: [archiver (db)] could not execute query: ERROR:  syntax error at or
> near "AS"
> LINE 2:     AS integer
>              ^
>      Command was: CREATE SEQUENCE change_email_domain_id_seq
>      AS integer
>      START WITH 1
>      INCREMENT BY 1
>      NO MINVALUE
>      NO MAXVALU...

Hm.  What this suggests is that you're using a pg_dump that is newer than
the server that you're trying to restore to.  The "AS datatype" clause
in CREATE SEQUENCE is new in v10.

The general rule for pg_dump version choice is "use the newest version you
can, but not newer than the server you're going to restore to".  Otherwise
you run into problems like this of the dump containing syntax the target
server doesn't understand.

            regards, tom lane


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

Предыдущее
От: robert
Дата:
Сообщение: Re: pg_restore has problems with restoring sequences.
Следующее
От: robert
Дата:
Сообщение: Re: pg_restore has problems with restoring sequences.