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 052BC25CE5 for ; Fri, 12 Jul 2019 14:58:47 -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 RI7hhiF3HzDY for ; Fri, 12 Jul 2019 14:58:46 -0400 (EDT) Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 4729125C3A for ; Fri, 12 Jul 2019 14:58:46 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH] sql: introduce ADD CONSTRAINT CHECK statement References: <20190708185715.44116-1-korablev@tarantool.org> <111b8923-25c3-0de3-0f6f-751b56d01910@tarantool.org> <4FC12E3F-79DC-4AB7-A3FA-139A3D901028@tarantool.org> From: Vladislav Shpilevoy Message-ID: <16e3c413-8964-fdf1-8c62-2f154569f6fc@tarantool.org> Date: Fri, 12 Jul 2019 21:00:10 +0200 MIME-Version: 1.0 In-Reply-To: <4FC12E3F-79DC-4AB7-A3FA-139A3D901028@tarantool.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit 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: "n.pettik" , tarantool-patches@freelists.org, Kirill Yukhin Hi! Thanks for the fixes! LGTM. On 12/07/2019 11:24, n.pettik wrote: > >> On 08/07/2019 20:57, Nikita Pettik wrote: >>> This patch extends parser's grammar to allow to create CHECK constraints >>> on already existent tables via SQL facilities. Syntax is following: >>> >>> ALTER TABLE ADD CONSTRAINT CHECK (); >>> >>> Closes #3097 >>> --- >> >> TarantoolBot request? > > sql: introduce ADD CONSTRAINT CHECK statement > > This patch extends parser's grammar to allow to create CHECK constraints > on already existent tables via SQL facilities. > > Closes #3097 > > @TarantoolBot document > Title: Document ADD CONSTRAINT CHECK statement > > Now it is possible to add CHECK constraints to already existent table > via SQL means. To achieve this one must use following syntax: > > ALTER TABLE
ADD CONSTRAINT CHECK (); > >>> diff --git a/test/sql-tap/alter2.test.lua b/test/sql-tap/alter2.test.lua >>> index 8969dfab2..4dc8f8255 100755 >>> --- a/test/sql-tap/alter2.test.lua >>> +++ b/test/sql-tap/alter2.test.lua >>> @@ -1,6 +1,6 @@ >>> #!/usr/bin/env tarantool >>> test = require("sqltester") >>> -test:plan(21) >>> +test:plan(26) >>> >>> -- This suite is aimed to test ALTER TABLE ADD CONSTRAINT statement. >>> -- >>> @@ -260,4 +260,50 @@ test:do_catchsql_test( >>> -- >>> }) >>> >>> +-- Test ADD CONSTRAINT CHECK functionality. CHECK constraints are >>> +-- intagrated into Tarantool's core, so basically we whould test >> >> Typos. 'intagrated', 'whould’. > > Thanks, these typos have been fixed. >