Обсуждение: restore problem from pg_dump & serial

Поиск
Список
Период
Сортировка

restore problem from pg_dump & serial

От
"Thomas T. Thai"
Дата:
i tried to restore a dump and encountered this error:

$ psql yellowpages -f yellowpages.data
You are now connected as new user pgsql.
psql:yellowpages.data:13: ERROR:  copy: line 619, Syntax error
psql:yellowpages.data:13: lost synchronization with server, resetting
connection
psql:yellowpages.data:392318: ERROR:  copy: line 100, Syntax error
psql:yellowpages.data:392318: lost synchronization with server, resetting
connection

line 13:
COPY "phone_cat" FROM stdin;

line 392318:
COPY "phone_address" FROM stdin;

the other tables were restored ok, and all the data are there. however the
two tables above had NO data. the only difference between these two tables
and the rest is that these have 'auto incrementing' or serial column. i'm
on 7.2.

---
Thomas T. Thai | Minnesota.com | tom@minnesota.com | 612.220.6220
Visit http://www.minnesota.com/




Re: restore problem from pg_dump & serial

От
Tom Lane
Дата:
"Thomas T. Thai" <tom@minnesota.com> writes:
> i tried to restore a dump and encountered this error:
> $ psql yellowpages -f yellowpages.data
> You are now connected as new user pgsql.
> psql:yellowpages.data:13: ERROR:  copy: line 619, Syntax error
> psql:yellowpages.data:13: lost synchronization with server, resetting
> connection
> psql:yellowpages.data:392318: ERROR:  copy: line 100, Syntax error
> psql:yellowpages.data:392318: lost synchronization with server, resetting
> connection

> line 13:
> COPY "phone_cat" FROM stdin;

But what's the 619'th line of data in this COPY?  And the 100'th line
in the other one?  And what are the schemas of the two tables?

            regards, tom lane