bug found in the dump/restore process
От | Cristóvão Dalla Costa |
---|---|
Тема | bug found in the dump/restore process |
Дата | |
Msg-id | 001a01c02e64$af83ed80$02ffa8c0@terrificus обсуждение исходный текст |
Ответы |
Re: bug found in the dump/restore process
|
Список | pgsql-admin |
Here's the story: * I created a table with a SERIAL type * I decided i'd rather insert the ids manually, so I dropped the sequence * when trying to restore from backup, psql fails because there's no sequence, and pg_dump created the table definition as if the sequence was still there * I removed the "default nextval ('xxx_seq'::text)" from the table definition, now restore works correctly. Here's a snippet from the dumpfile: CREATE TABLE "product" ( "id" int4 DEFAULT nextval('product_id_seq'::text) NOT NULL, "name" text, PRIMARY KEY ("id") ); The sequence 'product_id_seq' is the one which was dropped. The restore fails with "Invalid command: \N" when it reaches the first COPY FROM, which refers to another table. BTW, the bugtool page in the postgres website has blanks where it should be telling us where to post bug reports.
В списке pgsql-admin по дате отправления: