From: "n.pettik" <korablev@tarantool.org> To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: [tarantool-patches] Re: [PATCH] sql: introduce ADD CONSTRAINT CHECK statement Date: Fri, 12 Jul 2019 12:24:35 +0300 [thread overview] Message-ID: <4FC12E3F-79DC-4AB7-A3FA-139A3D901028@tarantool.org> (raw) In-Reply-To: <111b8923-25c3-0de3-0f6f-751b56d01910@tarantool.org> > 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 <table> ADD CONSTRAINT <name> CHECK (<expr>); >> >> 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 <table> ADD CONSTRAINT <name> CHECK (<expr>); >> 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( >> -- </alter2-5.2> >> }) >> >> +-- 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.
next prev parent reply other threads:[~2019-07-12 9:24 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-08 18:57 [tarantool-patches] " Nikita Pettik 2019-07-11 21:32 ` [tarantool-patches] " Vladislav Shpilevoy 2019-07-12 9:24 ` n.pettik [this message] 2019-07-12 19:00 ` Vladislav Shpilevoy 2019-07-13 14:16 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4FC12E3F-79DC-4AB7-A3FA-139A3D901028@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='[tarantool-patches] Re: [PATCH] sql: introduce ADD CONSTRAINT CHECK statement' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox