bug in pg_dump -- missing CREATE SEQUENCE statements

From: Brent Verner <brent(at)rcfile(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: bug in pg_dump -- missing CREATE SEQUENCE statements
Date: 2001-12-10 23:40:28
Message-ID: 20011210234028.GA12457@rcfile.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hey all,

pg_dump fails to output necessary CREATE SEQUENCE statements unless
the SERIAL column is named "id" when called with the '-t tablename'
switch. When '-t' is not specified, the CREATE SEQUENCE statements
do get output.

wishing-I'd-noticed-this-Friday-nite-ly y'rs,
brent

Observeration:

sleepy:/usr/local/pg-7.2/bin
brent$ ./psql -c '\d test2'
Table "test2"
Column | Type | Modifiers
--------+-----------------------+-------------------------------------------------
n | character varying(32) |
i | integer | not null default nextval('"test2_i_seq"'::text)
Unique keys: test2_i_key

sleepy:/usr/local/pg-7.2/bin
brent$ ./pg_dump brent -t test2
--
-- Selected TOC Entries:
--
\connect - brent

--
-- TOC Entry ID 2 (OID 16571)
--
-- Name: test2 Type: TABLE Owner: brent
--

CREATE TABLE "test2" (
"n" character varying(32),
"i" integer DEFAULT nextval('"test2_i_seq"'::text) NOT NULL
);

--
-- Data for TOC Entry ID 4 (OID 16571)
--
-- Name: test2 Type: TABLE DATA Owner: brent
--

COPY "test2" FROM stdin;
\.
--
-- TOC Entry ID 3 (OID 16573)
--
-- Name: "test2_i_key" Type: INDEX Owner: brent
--

CREATE UNIQUE INDEX test2_i_key ON test2 USING btree (i);

--
"Develop your talent, man, and leave the world something. Records are
really gifts from people. To think that an artist would love you enough
to share his music with anyone is a beautiful thing." -- Duane Allman

Browse pgsql-bugs by date

  From Date Subject
Next Message Ken Mathieu 2001-12-11 05:11:15 Pgsql question
Previous Message jacques.talbot 2001-12-10 21:33:27 problems linking with-tcl