On 30 Nov 2002, Neil Conway wrote: > On Sat, 2002-11-30 at 12:47, Stephan Szabo wrote: > > check constraints with subselects. > > Have we decided how this would even work? Last I heard, Tom still had > some major reservations about the practicality of implementing these -- > for example, would you re-evaluate all constraints that SELECT from a > table when the table changes?
You'd have to either do it in all cases or come up with something that was smart enough to limit the cases to some extent based on the expression. I doubt that it'd perform terribly well, especially at first. I can't see any justification for doing it as insert/update on main table only since by my reading of the spec the constraint is logically checked at the end of each statement (or transaction) even if we would normally not do so in practice when we know the constraint shouldn't be violated. Of course this was in the general set of, if I had months and months and nothing else to do (like work) then I'd want to look at it because I think it'd be useful. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster