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 <[EMAIL PROTECTED]> It would seem that more thought is needed here. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly