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 0813627A4C for ; Fri, 22 Feb 2019 01:48:41 -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 kL17iQw-mS1a for ; Fri, 22 Feb 2019 01:48:40 -0500 (EST) 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 4955927A2C for ; Fri, 22 Feb 2019 01:48:40 -0500 (EST) Date: Fri, 22 Feb 2019 09:48:37 +0300 From: Kirill Yukhin Subject: [tarantool-patches] Re: [PATCH] sql: fix grammar for foreign key actions Message-ID: <20190222064837.hw5o6cpeorjkjnfq@tarantool.org> References: <20190222005200.26374-1-korablev@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190222005200.26374-1-korablev@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: Nikita Pettik Cc: tarantool-patches@freelists.org Hello, On 22 Feb 03:52, Nikita Pettik wrote: > SQLite grammar implementing foreign keys parsing is quite compact, but > on the other hand it allows to define ON DELETE and ON UPDATE actions > multiple times. For instance: > > ... REFERENCES t ON DELETE CASCADE ON DELETE RESTRICT; > > It makes no sense and contradicts original ANSI syntax. So, lets rework > it a bit. Firstly, MATCH clause must come first, so we place it in > independent rule. Then we remove ON INSERT clause, since there is no > such opportunity at all. Finally, we have only 4 options to expose > refargs (i.e. grammar rule to parse FK actions): ON UPDATE, ON DELETE, > ON UPDATE ON DELETE, ON DELETE ON UPDATE. That's it. > > Closes #3475 > --- > Branch: https://github.com/tarantool/tarantool/commits/np/gh-3475-fix-fk-grammar > Issue: https://github.com/tarantool/tarantool/issues/3475 I've checked your patch into 2.1 branch. -- Regards, Kirill Yukhin