Subject Re: [firebird-support] Context variables in CHECK constraints
Author Nando Dessena
Marco,

M> What is so bad about using subqueries in CHECK constraints (provided
M> that they only SELECT on FK referenced tables)?

I'm not sure, but perhaps dependencies are not tracked.
On a related note, they could get you into troubles while restoring a
database.
Anyway, if they are allowed then they should work always and bugs be
fixed, IMHO.

M> What is wrong with using the NEW and OLD context variables in CHECK
M> constraints? I realize that it isn't documented, but it seems to work.

I didn't know that. Knowing how check constraints are implemented, now
that you make me think about it, it's obvious.
Should it be documented?

Ciao
--
Nando mailto:nandod@...