[Tarantool-discussions] Implicit cast for ASSIGNMENT
Konstantin Osipov
kostja.osipov at gmail.com
Thu Apr 30 15:35:00 MSK 2020
* Imeev Mergen <imeevma at tarantool.org> [20/04/30 15:13]:
> Hi! Here we go again. Last time we have not come to a colclusion.
>
> So, I suggest these rules for implicit cast for ASSIGNMENT:
> 1) Any value can be implicitly cast to ANY type.
> 2) Any scalar values can be implicitly cast to SCALAR type.
> 3) Values of numeric types can be implicitly cast to other numeric
> types.
SQL is strictly typed, there should be no implicit conversions
between numeric types.
The only possible exception is conversion of a lossless conversion
of a numeric literal, e.g.:
float_val = 1.1 -- implicitly convert decimal constant 1.1 to float
> 4) Implicit casting is prohibited, except as described above.
>
>
> I think that the rules for implicit casting when assigning value
> of numeric type must be the same as in C.
>
--
Konstantin Osipov, Moscow, Russia
https://scylladb.com
More information about the Tarantool-discussions
mailing list