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 3B57B25DFC for ; Fri, 12 Jul 2019 05:24:38 -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 ehIZRbZwgUrz for ; Fri, 12 Jul 2019 05:24:38 -0400 (EDT) Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (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 F0DCD25DFB for ; Fri, 12 Jul 2019 05:24:37 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: [tarantool-patches] Re: [PATCH] sql: introduce ADD CONSTRAINT CHECK statement From: "n.pettik" In-Reply-To: <111b8923-25c3-0de3-0f6f-751b56d01910@tarantool.org> Date: Fri, 12 Jul 2019 12:24:35 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <4FC12E3F-79DC-4AB7-A3FA-139A3D901028@tarantool.org> References: <20190708185715.44116-1-korablev@tarantool.org> <111b8923-25c3-0de3-0f6f-751b56d01910@tarantool.org> 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 Cc: Vladislav Shpilevoy > 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: >>=20 >> ALTER TABLE ADD CONSTRAINT CHECK (); >>=20 >> Closes #3097 >> --- >=20 > TarantoolBot request? sql: introduce ADD CONSTRAINT CHECK statement =20 This patch extends parser's grammar to allow to create CHECK = constraints on already existent tables via SQL facilities. =20 Closes #3097 =20 @TarantoolBot document Title: Document ADD CONSTRAINT CHECK statement =20 Now it is possible to add CHECK constraints to already existent = table via SQL means. To achieve this one must use following syntax: =20 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 =3D require("sqltester") >> -test:plan(21) >> +test:plan(26) >>=20 >> -- This suite is aimed to test ALTER TABLE ADD CONSTRAINT statement. >> -- >> @@ -260,4 +260,50 @@ test:do_catchsql_test( >> -- >> }) >>=20 >> +-- Test ADD CONSTRAINT CHECK functionality. CHECK constraints are >> +-- intagrated into Tarantool's core, so basically we whould test >=20 > Typos. 'intagrated', 'whould=E2=80=99. Thanks, these typos have been fixed.