Subject | Re: [Firebird-Architect] NOT UPDATABLE fields |
---|---|
Author | Adriano dos Santos Fernandes |
Post date | 2005-02-24T16:16:29Z |
Alexandre Benson Smith wrote:
But not with UPDATE statement and in "on update triggers".
Adriano
>Adriano dos Santos Fernandes wrote:Yes and the value should be updatable in "on insert triggers".
>
>
>
>>Many of my tables have fields with the values should not be changed.
>>These tables has on update triggers that update others tables.
>>
>>For integrity of the data (in case of the value is changed), I have to
>>check if old.field <> new.field and raise exception or maintain
>>complicated triggers with update the others tables depending on the old
>>value too.
>>
>>This syntax will be very helpful:
>>
>>create table t
>>(
>> f integer not updatable
>>);
>>
>>I think the flag can be stored in rdb$relation_fields.rdb$update_flag.
>>Check should be done at execution time because flag can be changed with
>>"alter table ... type ...".
>>
>>
>>Adriano
>>
>>
>>
>>
>>
>Adriano,
>
>Do you meant that the value should be only provided on insert, and no
>update be allowed ?
>
>
But not with UPDATE statement and in "on update triggers".
Adriano