Re: PostgreSQL 7.4.2 allows foreign key violation

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

> Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> > On Fri, 6 Aug 2004, Tom Lane wrote:
> >> 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).
>
> Oh, I see.  Seems an awfully expensive solution though :-(

Yeah.  That's the major downside. We could potentially do it only if there
are any instead rules or before triggers on the action we want to do
(either delete or update). I'm not sure if/how expensive that would be to
determine.  I think we could potentially check rules when the query is
planned (since presumably, those are the only rules that matter), but I
don't think that'd work for the triggers.


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

Предыдущее
От: Randy Yates
Дата:
Сообщение: Re: Postgres and Tools Intro?
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: replication