Sergiy Vyshnevetskiy <serg(at)vostok(dot)net> writes: > This should fix the problem. No, not at all. Consider if you'd written a domain CHECK constraint that rejects nulls, instead of the easy case. What we'd really have to do here is see if domain_in() will accept a NULL. I'm starting to get the feeling that the entire idea of NOT NULL domains is broken :-( regards, tom lane