[Tarantool-discussions] Implicit cast for ASSIGNMENT

Kirill Yukhin kyukhin at tarantool.org
Fri May 8 14:57:54 MSK 2020


Hello,

On 07 май 10:14, Peter Gulutzan wrote:
> Update: K. Yukhin has re-opened
> issue#4216 Silent NUMBER cast to INTEGER
> https://github.com/tarantool/tarantool/issues/4216
> and K. Osipov wrote:
> > OK, I didn't know it's ANSI. I withdraw my previous remarks and
> > side with Peter. Please do as he says about implicit casts of
> > numeric types.
> 
> Therefore I believe that everyone agrees with you,
> "Values ​​of numeric types can be implicitly cast to other numeric"
> for assignments.

I guess so.
 
> Therefore ...
> 
> This will be true for anything that has a numeric data type,
> now or in the planned future
> (DECIMAL, DOUBLE, INTEGER, NUMBER, UNSIGNED).
> 
> Maybe this will be true for STRING.
> UPDATE table_name SET integer_column = '1.1';
> I said that is bad but I don't decide.

I don't like the idea. We were talking about NUMBERIC-NUMERIC
conversions.

--
Regards, Kirill Yukhin


More information about the Tarantool-discussions mailing list