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 E1AAC2BEFC for ; Sun, 26 May 2019 09:32:29 -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 EByub2inyuJt for ; Sun, 26 May 2019 09:32:29 -0400 (EDT) Received: from smtp10.mail.ru (smtp10.mail.ru [94.100.181.92]) (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 9D9252BEEA for ; Sun, 26 May 2019 09:32:29 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v5 4/6] schema: add new system space for CHECK constraints References: <788556b70e154103ed1f6131db7ee1f8cd687848.1558605591.git.kshcherbatov@tarantool.org> From: Vladislav Shpilevoy Message-ID: Date: Sun, 26 May 2019 16:32:27 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 Cc: Kirill Shcherbatov On 26/05/2019 16:31, n.pettik wrote: > >>> diff --git a/src/box/sql/parse.y b/src/box/sql/parse.y >>> index f241b8d52..e93dfe751 100644 >>> --- a/src/box/sql/parse.y >>> +++ b/src/box/sql/parse.y >>> @@ -297,7 +297,7 @@ ccons ::= check_constraint_def . >>> >>> check_constraint_def ::= cconsname(N) CHECK LP expr(X) RP. { >>> create_ck_def_init(&pParse->create_ck_def, &N, &X); >>> - sql_add_check_constraint(pParse); >>> + sql_create_check_contraint(pParse); >> >> 9. What was a motivation of this rename? As I understand, >> we can add many CHECK constraints in one CREATE TABLE. We >> do not 'create' one single CHECK, we add multiple ones. Please, >> keep the old name. > > It was me who asked for this refactoring. We already have > sql_create_foreign_key() and sql_create_index(), so my > intention was to keep naming consistent. > Thanks for the clarification. Then the new name is ok.