bug found in the dump/restore process

From: Cristóvão Dalla Costa <cdallacosta(at)bigfoot(dot)com>
To: "pgsql-admin" <pgsql-admin(at)postgresql(dot)org>
Subject: bug found in the dump/restore process
Date: 2000-10-05 00:39:12
Message-ID: 001a01c02e64$af83ed80$02ffa8c0@terrificus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jeremy Ashcraft 2000-10-05 03:36:09 7.0 startup problem
Previous Message Sonika Malhotra 2000-10-04 08:59:52 help