Re: [PROPOSAL] ON DELETE SET NULL () for Foreign Key Constraints
| От | Tom Lane |
|---|---|
| Тема | Re: [PROPOSAL] ON DELETE SET NULL ( |
| Дата | |
| Msg-id | 25367.1547946730@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на |
[PROPOSAL] ON DELETE SET NULL ( |
| Ответы |
Re: [PROPOSAL] ON DELETE SET NULL ( |
| Список | 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 по дате отправления: