06.01.2016 00:49, Leyne, Sean wrote:
>
>> First of all, let's distinguish between two things: (1) how string literals 
>> are
>> described and (2) how CASE evaluates the resulting datatype. Changing any
>> of them may lead to the desired result.
>
> The issue is not the intermediate datatype but the final datatype.

The final datatype of the CASE expression. And it can be altered without 
describing literals as VARCHARs, that was the point.

> In Pavel's use case "color" is a VarChar as such any value/string/variable 
> which is assigned to it should be cast as a VarChar, regardless of the 
> intermediate datatype.
>
> The current outcome is wrong!

The SQL committee respectfully disagrees.

> P.S. The fact that a fix for this could introduce compatibility issues is not 
> a something we should care about when fixing invalid/wrong functionality.

Suggestion to describe literals as VARCHARs may fix the CASE issue but 
break something else that used to work correctly. Do you care?


Dmitry


------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to