Re: Referential integrity vulnerability in 8.3.3

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Referential integrity vulnerability in 8.3.3
Дата
Msg-id 487CA3ED.7060005@archonet.com
обсуждение исходный текст
Ответ на Re: Referential integrity vulnerability in 8.3.3  ("Sergey Konoplev" <gray.ru@gmail.com>)
Ответы Re: Referential integrity vulnerability in 8.3.3  ("Sergey Konoplev" <gray.ru@gmail.com>)
Re: Referential integrity vulnerability in 8.3.3  (Joris Dobbelsteen <joris@familiedobbelsteen.nl>)
Список pgsql-general
Sergey Konoplev wrote:
> Yes it is. But it the way to break integrity cos rows from table2
> still refer to deleted rows from table1. So it conflicts with
> ideology isn't it?

Yes, but I'm not sure you could have a sensible behaviour-modifying
BEFORE trigger without this loophole. Don't forget, ordinary users can't
work around this - you need suitable permissions.

You could rewrite PG's foreign-key code to check the referencing table
after the delete is supposed to have taken place, and make sure it has.
That's going to halve the speed of all your foreign-key checks though.

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Unicode database on non-unicode operating system
Следующее
От: Yi Zhao
Дата:
Сообщение: Re: how to found a variable is in a aggregation or not?