Re: referencial integrity constraint bug in version 7.0 beta 55
От | JanWieck@t-online.de (Jan Wieck) |
---|---|
Тема | Re: referencial integrity constraint bug in version 7.0 beta 55 |
Дата | |
Msg-id | 200005012141.XAA08439@hot.jw.home обсуждение исходный текст |
Ответ на | Re: referencial integrity constraint bug in version 7.0 beta 5 (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-general |
Peter Eisentraut wrote: > Jan Wieck writes: > > > Deny column dropping if column in question is used by an > > FK constraint. > > Actually, all the DROP commands in SQL have a RESTRICT/CASCADE choice that > ought to take care of this. Unfortunately, the PostgreSQL behavior is more > like `dangle' with an occasional `restrict' but nothing really consistent. > > > Propagate column or table renaming to FK constraints. > > Don't you refer to them by oid? No, they are table and attribute name strings given to the trigger as arguments. > > Emit a warning if at FK creation time no UNIQUE index > > exists over referenced PK attributes. > > That should actually be an error. (SQL clause 11.8 Syntax rule 2) Yes, I know. And then we need to deny index dropping while FK constraints need it in last consequence. That'd force the user to require dropping/recreating all FK constraints if he needs to repair (i.e. drop/recreate) one of those indices. That's why I suggest some non-compliance here. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #
В списке pgsql-general по дате отправления: