From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id BC4C546971A for ; Fri, 6 Dec 2019 14:37:12 +0300 (MSK) Date: Fri, 6 Dec 2019 14:37:11 +0300 From: Kirill Yukhin Message-ID: <20191206113711.ctzr6x7sqbpr3xkd@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v3 0/5] Replace control pragmas by SET List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org Hello Mergen! On 07 ноя 13:36, imeevma@tarantool.org wrote: > The main goal of this set of patches is to replace control pragmas > with the SET operator. Control pragmas are those that change SQL > settings. Along with this, we will allow to see SQL session-local > settings in unified way. > > https://github.com/tarantool/tarantool/issues/4511 > https://github.com/tarantool/tarantool/tree/imeevma/gh-4511-pragma-replaced-by-set We have at least two mail threads with discussions of how this will be working (PRAGMA and SET keywords). We have couple of verbal discussions, could you please post approach we developed? This is what I can remember: we're introducing new view (say _vsettings), which is specific for each sessions. This view should contain all settings which user allowed to read and write. Inserts are prohibited to that view. Updates are alowed only if user has enough privilages to the given setting. E.g. user cannot changes a way FK are checked or max nesting depth of a SELECT statement. I guess, we should create this view lazily in order not to harm performance. Please, make sure when you'll be working on the patchset. Having such a view will alow us to: 1. get rid of nasty pragma/set statements at all; 2. will simplify connectors programming; 3. improve security by allowing to *bind* values we wish to update, instead of concatenating big string like other broken DBMSes. AFAIR, we decided to set {'string', 'any'} format for that new view. Could you please summarize overall design and post it here (or in discussions, whatever). -- Regards, Kirill Yukhin