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  (David Huttleston Jr <dhjr@hddesign.com>)
Список 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 по дате отправления:

Предыдущее
От: "Vladimir V. Zolotych"
Дата:
Сообщение: postgres C++ functions
Следующее
От: Jeremy Ashcraft
Дата:
Сообщение: 7.0 startup problem