Subject Re: [firebird-support] Extending a domain
Author Alexandre Benson Smith
Adam wrote:
> Hello Group,
>
> I have a domain (defined as a varchar). I wish to extend it from 5 to
> 40 characters. The command to do that is:
>
> ALTER DOMAIN MYDOMAIN TYPE VARCHAR(40);
>
> Apart from changing the parameter or variable definitions in the
> stored procedures that reference these fields, do I need to do
> anything else such as:
>
> * Recreate indices / constraints containing fields with these domains?
> * Recreate procedures that reference such a field within an internal
> query?
>
> eg, a query like the following may exist in a stored procedure.
> update mytable set
> mydomainfield1 = mydomainfield2;
>
> * Recreate triggers referencing these fields?
>
> I just don't want any nasty surprises like the BLR errors you can get
> when you call a procedure within another procedure, then modify the
> input or return parameters (can't remember which) of the internal
> procedure.
>
>
> Thanks
>
> Adam
>

Adam,

AFAIR FB will not allow you to alter a type of a field if it has any
dependencies (used inside a SP or trigger for example). So you will need
to empty the procedure/trigger body, alter the domain, recreate the
SP/trigger.

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br