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 A4A9A24C46 for ; Mon, 4 Feb 2019 10:28:43 -0500 (EST) 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 hq_TSVxVNMWc for ; Mon, 4 Feb 2019 10:28:43 -0500 (EST) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 5374A24B18 for ; Mon, 4 Feb 2019 10:28:43 -0500 (EST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: [tarantool-patches] Re: [PATCH] sql: raise err on CHECK + ON CONFLICT REPLACE From: "n.pettik" In-Reply-To: <20190204144414.91752-1-ivan.koptelov@tarantool.org> Date: Mon, 4 Feb 2019 18:28:40 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <91846D24-DD2B-4658-A309-1EAB34B7631D@tarantool.org> References: <20190204144414.91752-1-ivan.koptelov@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: Ivan Koptelov > On 4 Feb 2019, at 17:44, Ivan Koptelov = wrote: >=20 > Adds error raise in case of CHECK constraint declared with ON > CONFLICT REPLACE action. Before the patch such option was > forbidden, but if a user tried to create space with such constraint, > this attempt failed silently. >=20 What is more, now all on conflict actions are ignored for check constraints. So lets simply fix parser to disallow this clause. It is quite easy: all you need is to remove onconf rule after CHECK keyword: 319 tcons ::=3D CHECK LP expr(E) RP onconf. 320 = {sql_add_check_constraint(pParse,&E);}