Subject | Re: Domains in SP & Triggers. |
---|---|
Author | Alexander Klenin |
Post date | 2004-10-11T13:48:51Z |
> I can just imagine that, if this was provided, we would getI would say that such complaints will be justified. If the
> inundated with complaints that the constraints and defaults were
> not applied (despite the problems this would cause in all but
> specialised situations).
domains in SPs will be ever implemented (and I want this
feature as much as anybody), then contrained domains
should be either implemented fully or explicitly
disallowed with the appropriate error message.
Situation where engine lets you declare
CREATE DOMAIN BOOLEAN AS SMALLINT CHECK IS IN (0, 1);
then say
DECLARE A BOOLEAN = 5;
is indeed worse than no domains at all.
> But I would still like it. As far as possible I currently writeYes, this is the pain I share ;-)
> all my triggers and procedure variables with a little comment
> telling me what domain they belong to. Then, when I need to
> change a domain, I can search through my scripts and discover
> all the places that used that domain and update accordingly.
> Its an ugly, nasty, horrible process on very big scripts, but
> it seems the only way to keep things in sync at the moment.
So, if possible, I would like even the simplest
implementation -- just domains without constraints, and
reqiurement to drop all procedures before altering domain.
---
Professional hosting for everyone - http://www.host.ru