Re: Referential integrity vulnerability in 8.3.3

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Referential integrity vulnerability in 8.3.3
Дата
Msg-id 20080715171709.GB5623@fetter.org
обсуждение исходный текст
Ответ на 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>)
Список pgsql-general
On Tue, Jul 15, 2008 at 06:02:27PM +0400, 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.
> >
>
> I'm not sure I've understood you right, sorry. Does "rewrite PG's
> foreign-key code" mean DDL? If it does how could I do this?

The code you posted is a clear case of doing things wrong
deliberately.  In order to prevent this error, you would need to
rewrite large parts of Postgres's code which checks referential
integrity, and there would still be things that deliberately wrong
DDL, triggers, rules, etc. could do.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Installing PostgreSQL without using CygWin
Следующее
От: "olivier.scalbert@algosyn.com"
Дата:
Сообщение: Re: Out of memry with large result set