Re: bug with constraint dependencies? or bug with
От | Stephan Szabo |
---|---|
Тема | Re: bug with constraint dependencies? or bug with |
Дата | |
Msg-id | 20030828085329.N7506-100000@megazone.bigpanda.com обсуждение исходный текст |
Ответ на | bug with constraint dependencies? or bug with pg_dump/pg_restore? (Gregory Stark <gsstark@mit.edu>) |
Ответы |
Re: bug with constraint dependencies? or bug with
Re: bug with constraint dependencies? or bug with Re: bug with constraint dependencies? or bug with |
Список | pgsql-hackers |
On 28 Aug 2003, Gregory Stark wrote: > It seems when you create a new table with the "references" syntax the > constraint is created with a dependency specifically on a "primary key" > constraint on the target table. > > However when you alter a table to add a foreign key constraint the constraint > is added with a dependency on any unique index on the column -- not > necessarily a primary key constraint. Well, it shouldn't be limited to a primary key constraint (you must be able to reference a non-primary key unique constraint). If we didn't need to worry about backward compatiblity, we could make it dependant on the unique/primary key constraint, not the underlying index (because upgraded old systems might only generate a unique index). However, that would only help if the unique constraint were created before the references constraint.
В списке pgsql-hackers по дате отправления: