From: Cristóvão Dalla Costa <cdallacosta@bigfoot.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: bug found in the dump/restore process
Date: Wed, 4 Oct 2000 21:39:12 -0300
Message-ID: <001a01c02e64$af83ed80$02ffa8c0@terrificus> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: cdallacosta@bigfoot.com
Subject: Re: bug found in the dump/restore process
In-Reply-To: <001a01c02e64$af83ed80$02ffa8c0@terrificus>
References: <001a01c02e64$af83ed80$02ffa8c0@terrificus>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox