bug found in the dump/restore process - Mailing list pgsql-admin

From Cristóvão Dalla Costa
Subject bug found in the dump/restore process
Date
Msg-id 001a01c02e64$af83ed80$02ffa8c0@terrificus
Whole thread Raw
Responses Re: bug found in the dump/restore process
List 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 by date:

Previous
From: "Vladimir V. Zolotych"
Date:
Subject: postgres C++ functions
Next
From: Jeremy Ashcraft
Date:
Subject: 7.0 startup problem