pg_dump is broken in CVS tip

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: pg_dump is broken in CVS tip
Date: 2002-04-12 17:28:34
Message-ID: 28170.1018632514@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

pg_dumping a table having a primary key yields commands like

--
-- TOC Entry ID 2 (OID 139812)
--
-- Name: table1 Type: TABLE Owner: postgres
--

CREATE TABLE "table1" (
"column10" character varying(255) NOT NULL,
"column1" character varying(255) NOT NULL,
"column2" smallint NOT NULL,
"column6" numeric,
"column7" "char",
Constraint "table1_pkey" Primary Key ("column10", "column1", "column2")
);

[snip]

--
-- TOC Entry ID 5 (OID 139817)
--
-- Name: "table1_pkey" Type: CONSTRAINT Owner: postgres
--

Alter Table "table1" Add Constraint "table1_pkey" Primary Key ("column10", "column1", "column2");

which on execution quite properly complains about duplicate primary
keys.

I assume this is traceable to this patch:

2002-03-06 15:48 momjian

* src/bin/pg_dump/pg_dump.c: Enable ALTER TABLE ADD PRIMARY KEY for
pg_dump, for performance reasons so index is not on table during
COPY.

> > AFAICT, the patch I posted to -patches a little while to enable
the
> > usage of ALTER TABLE ADD PRIMARY KEY by pg_dump hasn't been
applied, nor
> > is it in the unapplied patches list. I was under the impression
that
> > this was in the queue for application -- did it just get lost?

Neil Conway <neilconway(at)rogers(dot)com>

It would seem that more thought is needed here.

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2002-04-12 17:57:28 Re: numeric/decimal docs bug?
Previous Message Tom Lane 2002-04-12 16:51:26 Re: 7.3 schedule