Subject Re: [firebird-support] How to use a Domain in a Stored Procedure
Author Jacqui Caren
Aage Johansen wrote:
> Jacqui Caren wrote:
> > ...
> >
> > Even better, something similar to oracle
> >
> > declare variable pID MYTABLE.PID%TYPE;
> >
> > Eliminates the possibility that you get the domain wrong.
> >
> If you then change the domain definition you would "invalidate" the procedure.
> This has been discussed (on the firebird-devel list?), but I don't remember
> whether any action on this was agreed upon.

For a trigger, internal vars (those intended to hold field values)
should match field data types. If the domain changes then the field
should change and so should the triggers.

Likewise for stored procedures that are intended to be table

The above example does not use domains but depends upon a field in a
specific database table. Only when the table field is modified does
the stored procedure need changing.

And yes I agree this can get dependency messy, but the current situation
appears to be that trigger/table domain changes require manual
trigger/SP modifications which (AFAICS) is not just messy but smelly.

I would love to see a resolution for this issue some time in/after
the vulcan release - I see little chance of a resolution that
requires SP dependency changes before then.