Subject Re: [firebird-support] Altering tables
Author James
Hi

Martijn Tonies wrote:

>Hi,
>
>
>
>>A lazy way which I use often. Try at your own risk.
>>
>>create domain NAME_LONG as varchar(80);
>>update RDB$RELATION_FIELDS
>> set RDB$FIELD_SOURCE = 'NAME_LONG'
>>where RDB$RELATION_NAME = 'STOCK'
>> and RDB$FIELD_NAME = 'STOCK_NAME';
>>
>>
>
>Why are you doing this?
>
>Firebird has a statement ALTER TABLE that allows
>you to do this without messing around with the system
>tables.
>
>
>
Martijn, Iam doing the same thing Almond do. Well I agree with Almond
that it is really a lazy way to change column in a table. Many times in
my experience when trying to alter a column with a lot of dependencies,
it very painful to drop those dependencies like view, triggers, and
procedures and alter the column and rebuild those view, triggers, and
procedures.

Here is my following steps. I make a backup first. Then a the backup I
made the changes I want and backup it up again to perform restore so
that the dependencies could be rebuild.

I hope FB gurus are watching this thread and might gives us some notes
on this one :-)

Cheers

James