Re: Domain for numbers.



Naga lenoj wrote:

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
cases.
Can anyone help me?
I am using postgresql(for your information).

If I recall correctly, postgresql has some support for regular expressions:
http://www.postgresql.org/docs/8.1/static/functions-matching.html

Does it support general constraints with a CHECK keyword? Yes it does:
http://www.postgresql.org/docs/8.1/static/ddl-constraints.html
.



Relevant Pages

  • Re: Domain for numbers.
    ... assign the integrity which can check the following values, ... 23334, ASDER, SDE23, 233A4 and like this. ... And still you can join a price with a weight, which destroys the whole idea ...
    (comp.databases.theory)
  • Re: Domain for numbers.
    ... assign the integrity which can check the following values, ... 23334, ASDER, SDE23, 233A4 and like this. ... I am also going to guess that your new 'data type/DOMAIN' has other ...
    (comp.databases.theory)
  • Re: Domain for numbers.
    ... assign the integrity which can check the following values, ... 23334, ASDER, SDE23, 233A4 and like this. ... Haven't you heard of a check constraint? ...
    (comp.databases.theory)
  • Re: Domain for numbers.
    ... 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 ...
    (comp.databases)
  • Domain for numbers.
    ... Actually, i have a need to store the numbers like "AS2303", ... 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 ...
    (comp.databases)