| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Gavin Scott" <gavin(at)planetacetech(dot)com> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #2299: pg_dump error w/ renamed primary keys |
| Date: | 2006-03-04 22:36:25 |
| Message-ID: | 27850.1141511785@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
"Gavin Scott" <gavin(at)planetacetech(dot)com> writes:
> If you rename a primary key, pg_dump tries to recreate it with the original
> name. Here is how to recreate:
>> CREATE TABLE foo ( id integer );
>> ALTER TABLE foo ADD CONSTRAINT foo_pkey PRIMARY KEY (id);
>> ALTER TABLE foo_pkey RENAME TO bar_pkey;
This is correct, as the controlling name is that of the constraint not
the index. We really should forbid the above entirely, but it's not
a very high-priority issue.
(Somewhat higher priority is to add a RENAME CONSTRAINT capability;
that's on the TODO list. There was a patch for this submitted recently
but it needs work...)
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2006-03-05 00:54:09 | Re: BUG #2292: Calling conventions in docs |
| Previous Message | Alvaro Herrera | 2006-03-04 21:45:57 | Re: BUG #2300: Error in upper function |