[Tarantool-patches] [PATCH v3 0/5] Replace control pragmas by SET

Kirill Yukhin kyukhin at tarantool.org
Fri Dec 6 14:37:11 MSK 2019


Hello Mergen!

On 07 ноя 13:36, imeevma at 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


More information about the Tarantool-patches mailing list