firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Incorrectly computed view field size when concatenating string literals

Open sim1984 opened this issue 4 years ago • 0 comments

set names UTF8;
connect 'inet4://localhost:3053/test' user SYSDBA password 'masterkey';
Database: 'inet4://localhost:3053/test', User: SYSDBA

CREATE OR ALTER VIEW VW_TB3(
     RENT)
 AS
 select
   'ab '||' ab '||' abcd'
from $RDB$DATABASE;

show view VW_TB3;
RENT                            VARCHAR(2) Expression <-- Error
View Source:
==== ======
select
'ab '||' ab '||' abcd'
from rdb$database

Expected VARCHAR (12), actual VARCHAR (2)

Reproduced in Firebird 3.0.7, 4.0.0 and 5.0

sim1984 avatar Sep 13 '21 09:09 sim1984