Re: Problem with COPY command on pg_dump

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with COPY command on pg_dump
Дата
Msg-id 6646.1512836596@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Problem with COPY command on pg_dump  (Rob Sargent <robjsargent@gmail.com>)
Список pgsql-general
Rob Sargent <robjsargent@gmail.com> writes:
>> On Dec 9, 2017, at 8:42 AM, Blake McBride <blake@mcbride.name> wrote:
>> I am using pg_dump on version 9.5.10 and trying to import it on version 9.3.20.  Many (or all) COPY commands are
failingwith messages like:   
>> psql:16504.db:16874: ERROR:  missing data for column "street"
>> CONTEXT:  COPY address, line 1: ""

> Is there in fact ‘street’ data in the file?   Sounds like you have the wrong number of columns. Do you have your
actualdump and restore commands to show here? 

While pg_dump certainly does sometimes produce output that doesn't reload
into older servers, we try to minimize such problems --- and in any case,
the actual COPY data shouldn't be a source of issues.  I'm suspicious that
the true problem occurred earlier; maybe a table drop/creation failed
and now COPY is trying to load into a pre-existing table that has the
right name and the wrong column list.

I'd counsel looking at the *first* error message and resolving that,
then trying again.  Anything later could just be cascaded failures.

            regards, tom lane


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

Предыдущее
От: Dale Seaburg
Дата:
Сообщение: Windows XP to Win 10 migration issue
Следующее
От: Blake McBride
Дата:
Сообщение: Re: Problem with COPY command on pg_dump