Paul Martinez <hello...@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