[tarantool-patches] Re: [PATCH] sql: fix grammar for foreign key actions

Kirill Yukhin kyukhin at tarantool.org
Fri Feb 22 09:48:37 MSK 2019


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




More information about the Tarantool-patches mailing list