Hannu Krosing <hannu@tm.ee> writes:
> Agreed. Most of this would be easy to implement for curent
> implementation (but perhaps no more efficient than when done by manually
> added rules/triggers) if constraints could contain subqueries.
I don't understand what a constraint containing a subquery means.
Does it constrain the table(s) referenced by the subquery too? If not,
what's the point --- adding, dropping or altering rows in the referenced
table might make the constraint condition false. If it does constrain
the referenced tables, how the heck are you going to implement that in a
reasonable fashion?
regards, tom lane