[tarantool-patches] Re: [PATCH] sql: introduce ADD CONSTRAINT CHECK statement

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Jul 12 22:00:10 MSK 2019


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 <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.
> 




More information about the Tarantool-patches mailing list