On mån, 2009-11-23 at 12:50 -0500, Caleb Cushing wrote: > and domains > only seem right if it's something, like a zip code, that has a very > specific set of rules, that is in reality it's own type.
A domain is not really its own type, it's a domain over its base type. Hence the name. > where > specifying something like 'empty' feels as generic (and arbitrary?) as > null. The problem with your empty constraint is that it's data type specific, and therefore the operator is also different depending on context. So either you create a "named generic constraint" for every data type you are interested in (in that case, see domains), or the thing could at best work as a text substitution mechanism, which is something that SQL typically doesn't do. > empty is not the only example (I'm sure), just the best I can > think of. I doubt that there are any really good examples that cannot be solved with the current facilities. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers