From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 2288E2A9F1 for ; Tue, 18 Sep 2018 22:25:06 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KjMvkdVrD7s4 for ; Tue, 18 Sep 2018 22:25:06 -0400 (EDT) Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id D63652A9ED for ; Tue, 18 Sep 2018 22:25:05 -0400 (EDT) Date: Wed, 19 Sep 2018 05:25:02 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH 4/6] sql: enforce implicit type conversions Message-ID: <20180919022502.GC2386@chai> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, pgulutzan@ocelot.ca Cc: Georgy Kirichenko * Nikita Pettik [18/09/18 01:19]: > From: Georgy Kirichenko > > 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 ), 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, > 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