Skip to content
Snippets Groups Projects
Commit 53b0ef87 authored by Georgy Kirichenko's avatar Georgy Kirichenko Committed by Nikita Pettik
Browse files

sql: enforce implicit type conversions

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.
parent de53867d
No related branches found
No related tags found
No related merge requests found
Showing
with 424 additions and 307 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment