You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When field is altered, a computed fields, that depend on it, don't altered.
Example:
create table test(f1 varchar(6));
commit;
create table test1(f1 integer, f2 computed by((select first 1 f1 from test)));
commit;
alter table test alter column f1 type varchar(8);
commit;
insert into test(f1) values('qwertyqw');
commit;
insert into test1(f1) values(1);
commit;
select * from test1; --arithmetic exception, numeric overflow, or string truncation
The text was updated successfully, but these errors were encountered:
I agree, just because a DBA has the ability to define a computed field does not mean that every possible consideration can be supported, as is clearly the case in this example.
description: When field is altered, a computed fields, that depend on it, don't altered.
Example:
create table test(f1 varchar(6));
commit;
create table test1(f1 integer, f2 computed by((select first 1 f1 from test)));
commit;
create view v1 as select f1 from test;
commit;
alter table test alter column f1 type varchar(8);
commit;
insert into test(f1) values('qwertyqw');
commit;
insert into test1(f1) values(1);
commit;
select * from test1; --arithmetic exception, numeric overflow, or string truncation
=>
When field is altered, a computed fields, that depend on it, don't altered.
Example:
create table test(f1 varchar(6));
commit;
create table test1(f1 integer, f2 computed by((select first 1 f1 from test)));
commit;
alter table test alter column f1 type varchar(8);
commit;
insert into test(f1) values('qwertyqw');
commit;
insert into test1(f1) values(1);
commit;
select * from test1; --arithmetic exception, numeric overflow, or string truncation
Submitted by: @vasiliy-yashkov
When field is altered, a computed fields, that depend on it, don't altered.
Example:
create table test(f1 varchar(6));
commit;
create table test1(f1 integer, f2 computed by((select first 1 f1 from test)));
commit;
alter table test alter column f1 type varchar(8);
commit;
insert into test(f1) values('qwertyqw');
commit;
insert into test1(f1) values(1);
commit;
select * from test1; --arithmetic exception, numeric overflow, or string truncation
The text was updated successfully, but these errors were encountered: