Check DOMAINs. They are derived data types that take a base type and add, optionally, one or more CHECK constraints to them.
They are not perfect, but probably something close to what you are looking for.
They are not perfect, but probably something close to what you are looking for.