After preparing query
select * from rdb$database
where char_length(:value1) = 1
the type of value1 will be INTEGER
Generally, if parameter is an argument of CHAR_LENGTH, then its type depends on other part's one in equality predicate. No doubt, this behavior is erroneous.
Also, server can't determine parameter type when meeting the single CHAR_LENGTH's call - preparing
select char_length(:value1) from rdb$database
returns ?Data type unknown?.
With best regards, Eugene