Run-time Checking for Concatenation Overflow
Compile-time checking for concatenation overflow has been replaced by run-time checking.
From Firebird 1.0 onward, concatenation operations have been checked for the possibility that the
resulting string might exceed the string length limit of 32,000 bytes, i.e. overflow. This check was performed
during the statement prepare, using the declared operand sizes and would throw an error for an expressions such
as:
CAST('qwe' AS VARCHAR(30000)) || CAST('rty' AS VARCHAR(30000))
From Firebird 2.0 onward, this expression throws only a warning at prepare time and the overflow check is
repeated at runtime, using the sizes of the actual operands. The result is that our example will be executed
without errors being thrown. The isc_concat_overflow exception is now thrown only for
actual overflows, thus bringing the behaviour of overflow detection for concatenation into line with that for
arithmetic operations.