Re: [PROPOSAL] ON DELETE SET NULL () for Foreign Key Constraints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PROPOSAL] ON DELETE SET NULL () for Foreign Key Constraints
Дата
Msg-id 25367.1547946730@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [PROPOSAL] ON DELETE SET NULL () for Foreign Key Constraints  (Paul Martinez <hellopfm@gmail.com>)
Ответы Re: [PROPOSAL] ON DELETE SET NULL () for Foreign Key Constraints
Список pgsql-hackers
Paul Martinez <hellopfm@gmail.com> writes:
> I have a proposal for a feature to add to Postgres. I believe it is a natural
> extension to the current standard SQL ON DELETE SET NULL behavior when using
> composite foreign keys. The basic idea is that you can specify which columns to
> set to NULL in the DELETE trigger created by a foreign key constraint.

This seems like kind of a kluge, because it can only work in MATCH SIMPLE
mode, not MATCH FULL or MATCH PARTIAL.  (We don't have MATCH PARTIAL atm,
but it's in the spec so I imagine somebody will get around to implementing
it someday.  Anyway MATCH FULL is there now.)  In the latter two modes,
setting a subset of the referencing columns to null isn't sufficient to
make the row pass the constraint.

            regards, tom lane


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

Предыдущее
От: Vik Fearing
Дата:
Сообщение: Re: pg_stat_statements vs. SELECT FOR UPDATE
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Ryu floating point output patch