Subject Re: [Firebird-Architect] Feature Request: Domains in SP & Triggers.
Author Daniel Rail
Hello Geoff,

Monday, October 11, 2004, 5:45:30 AM, you wrote:


>>> I dont particularly want domain constraints applied to domains
>>> used in triggers and SPs. I just want the data-type, for two
>>> reasons...
>>>
>>> - Its convenient
>>>
>>> - It helps procedures to self-document - for example; here
>>> is a variable and its type (domain) tells you that this
>>> char(1) (or smallint or whatever) is used as a boolean.

>> I proposed the same more than two years ago, but the reaction
>> from the audience wasn't encouraging.
>> :-)

I think I did support the idea too.

> I can just imagine that, if this was provided, we would get
> inundated with complaints that the constraints and defaults were
> not applied (despite the problems this would cause in all but
> specialised situations).

As long as it is well documented, we can always tell them to RTFM.

> But I would still like it. As far as possible I currently write
> 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.

> Being able to use the domains directly would save me lots of
> typing, and the pain of finding out that I missed some trigger
> or procedure.

I still believe that if changing a field type in a table, it should
trigger the recompile of dependant triggers and stored procedures.
And, with this in place it should be possible to use domains in
triggers and SPs. Although I have to admit, that proper planning
would need to be done, and not do something half-baked.

--
Best regards,
Daniel Rail
Senior Software Developer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)