Re: Domain for numbers.
Date: Thu, 17 Jan 2008 17:23:56 GMT
"Naga lenoj" <nagalenoj_at_gmail.com> wrote in message
> Actually, i have a need to store the numbers like "AS2303",
> TS3381"(first 2 alphabets,next 3 numbers). What i want is, i have to
> assign the integrity which can check the following values,
> 23334, ASDER, SDE23, 233A4 and like this.
> If i assign as a character type domain.Then i can't check the above
> Can anyone help me?
> I am using postgresql(for your information).
Check constraints are light-weight when it comes to defining domains. You need to enforce this rule (not a domain) via a trigger or a stored proc. And still you can join a price with a weight, which destroys the whole idea of a domain.
Evan Received on Thu Jan 17 2008 - 18:23:56 CET