[tarantool-patches] Re: [PATCH 4/6] sql: enforce implicit type conversions

Konstantin Osipov kostja at tarantool.org
Wed Sep 19 05:25:02 MSK 2018


* Nikita Pettik <korablev at tarantool.org> [18/09/18 01:19]:
> From: Georgy Kirichenko <georgy at tarantool.org>
> 
> Most DBs (at least PostgreSQL, Oracle and DB2) allow to process
> following queries:
> 
> CREATE TABLE t1 (id INT PRIMARY KEY);
> INSERT INTO t1 VALUES (1.123), ('2');
> 
> In this particular case, 1.123 should be simply truncated to 1,
> and '2' - converted to literal number 2.
> 
> After passing real type to Tarantool (instead of <SCALAR>), example
> above would fail without conversions. Thus, lets add implicit
> conversions inside VDBE to make this example be legal.
> However, still some types conversions must be prohibited. For instance,
> <BLOB> can't be converted to integer or floating point numerical,
> and vice versa.

Peter, could you please clarify why is this standard?

 

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov




More information about the Tarantool-patches mailing list