Re: PQendcopy:resetting connection Problem and Cannot insert a duplicate key into unique index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PQendcopy:resetting connection Problem and Cannot insert a duplicate key into unique index
Дата
Msg-id 10826.1265211764@sss.pgh.pa.us
обсуждение исходный текст
Ответ на PQendcopy:resetting connection Problem and Cannot insert a duplicate key into unique index  ("Wang, Mary Y" <mary.y.wang@boeing.com>)
Ответы Re: PQendcopy:resetting connection Problem and Cannot insert a duplicate key into unique index  ("Wang, Mary Y" <mary.y.wang@boeing.com>)
Список pgsql-general
"Wang, Mary Y" <mary.y.wang@boeing.com> writes:
> I managed to restore my database. However, one table is not restored.
> The error message that I was received was "copy: line 3057, Cannot insert a duplicate key into unique index
users_pkey..."and then "...PQendcopy:resetting connection" 

> Then I went to the log file (my debug file was set to level 5),
> ProcessUtility: COPY "users"  FROM stdin;
> ERROR:  copy: line 3057, Cannot insert a duplicate key into unique index users_pkey"

> My question is that line #3057.  Do I count it from the line where it did "COPY "users" FROM stdin" as the first line
andcount up to 3057 lines (that line is the problem)? 

IIRC, even as far back as 7.1, that should be read as "the 3057'th row
of COPY data for this table".  So you can count forward 3057 lines from
the COPY command in the dump file ... unless you have any embedded
newlines in your data, in which case it could get a bit painful to
count correctly.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: stat collector is not using
Следующее
От: john blair
Дата:
Сообщение: statically linking libpq to psycopg2