| От | Grzegorz Jaśkiewicz |
|---|---|
| Тема | Re: Foreign Key Unique Constraint can be dropped |
| Дата | |
| Msg-id | 2f4958ff0906080452h6b949ddcj28270b65d4563abe@mail.gmail.com обсуждение |
| Ответ на | Foreign Key Unique Constraint can be dropped (Vlado Moravec <vm.devs@gmail.com>) |
| Список | pgsql-general |
On Mon, Jun 8, 2009 at 11:48 AM, Vlado Moravec<vm.devs@gmail.com> wrote: > Hi, > from postgres docs: "foreign key must reference columns that either are a > primary key or form a unique constraint". It does not allow creating foreign > key constraint on non-unique column - an error is raised. > After playing with a new database I discovered that such a unique constraint > can be droped after the foreign key constraint has been established. No > warning, no error. > Is such a behaviour intended? I have found no references in the docs. what version of postgresql you're testing it on ? you're sure that foreign key isn't dropped as well ? On 8.3 and 8.4 it doesn't allow me to do it, unless I drop index/constraint cascade, in which case foreign key constraint gets dropped as well.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера