Subject | update rdb$fields - is it safe? |
---|---|
Author | maximshiryaev |
Post date | 2007-11-06T09:11:57Z |
Hello.
I've created a table in FB1.5.3CS with computed by fields referring
to UDF. Now the database cannot be resotred because gbak resores
tables before UDFs - looks like a known bug but not for me...
Is it safe to do something like:
update rdb$fields f
set
f.rdb$computed_source =
(select f1.rdb$computed_source
from rdb$fields f1
where f1.rdb$field_name = 'RDB$5035'),
f.rdb$computed_blr =
(select f1.rdb$computed_blr
from rdb$fields f1
where f1.rdb$field_name = 'RDB$5035')
where
f.rdb$computed_source is not null and
f.rdb$field_name <> 'RDB$5035'
where RDB$5035 is a field with COMPUTED BY without UDF and the same
length.
Or there is some better way using ALTER TABLE? Simple ALTER MY_FIELD
CHAR(36) doesn't work - the field remains computed by.
Thanks.
Maxim.
I've created a table in FB1.5.3CS with computed by fields referring
to UDF. Now the database cannot be resotred because gbak resores
tables before UDFs - looks like a known bug but not for me...
Is it safe to do something like:
update rdb$fields f
set
f.rdb$computed_source =
(select f1.rdb$computed_source
from rdb$fields f1
where f1.rdb$field_name = 'RDB$5035'),
f.rdb$computed_blr =
(select f1.rdb$computed_blr
from rdb$fields f1
where f1.rdb$field_name = 'RDB$5035')
where
f.rdb$computed_source is not null and
f.rdb$field_name <> 'RDB$5035'
where RDB$5035 is a field with COMPUTED BY without UDF and the same
length.
Or there is some better way using ALTER TABLE? Simple ALTER MY_FIELD
CHAR(36) doesn't work - the field remains computed by.
Thanks.
Maxim.