Subject | How to alter the check constraint of a domain definition? |
---|---|
Author | Michael Weissenbacher |
Post date | 2013-01-11T09:56:54Z |
Hi List!
I've got a little problem that i hope to be able to solve without
dropping and reacreating all columns that depend on a buggy domain
definition.
I have a database where the following domain is defined:
CREATE DOMAIN MY_ENUM
AS char(1) CHARACTER SET ASCII NOT NULL
CHECK (value>'A' and value<'Z')
COLLATE ASCII;
Well, the problem is that the constraint should in fact be "CHECK
(value>='A' and value<='Z')".
Is there a way to alter this check constraint? Maybe by updating some
system table?
The documentation only says how to rename a domain or how to change the
default value.
thx in advance,
Michael
I've got a little problem that i hope to be able to solve without
dropping and reacreating all columns that depend on a buggy domain
definition.
I have a database where the following domain is defined:
CREATE DOMAIN MY_ENUM
AS char(1) CHARACTER SET ASCII NOT NULL
CHECK (value>'A' and value<'Z')
COLLATE ASCII;
Well, the problem is that the constraint should in fact be "CHECK
(value>='A' and value<='Z')".
Is there a way to alter this check constraint? Maybe by updating some
system table?
The documentation only says how to rename a domain or how to change the
default value.
thx in advance,
Michael