Re: PostgreSQL 7.4.2 allows foreign key violation

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: PostgreSQL 7.4.2 allows foreign key violation
Дата
Msg-id 20040806101210.J13916@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: PostgreSQL 7.4.2 allows foreign key violation  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-general
On Fri, 6 Aug 2004, Stephan Szabo wrote:

> On Fri, 6 Aug 2004, Tom Lane wrote:
>
> > Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> > > It also looks like before triggers returning NULL can break them.
> >
> > Or a BEFORE trigger that overrides the attempted field update.
> >
> > > I think we'd been worried about the added cost of doing the check when
> > > the average case doesn't have this problem but we should probably just
> > > eat it.  In practice I think it's one line of code per action function
> > > (on update set default already does it).
> >
> > Already does what?  I see nothing in there that would override either
> > triggers or rules...
>
> It's not for overriding the triggers or rules, but instead checking that
> the post action state is valid (by running the no action code which
> makes sure that either another row now has the pk value or that there are
> no longer any matching rows).

To make that clearer, that another row now has the old pk value, or that
there are no longer any matching rows to the old pk value.

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

Предыдущее
От: Si Chen
Дата:
Сообщение: replication
Следующее
От: ruben
Дата:
Сообщение: Re: Slow after VACUUM, fast after DROP-CREATE INDEX