[Tarantool-patches] [PATCH 4/5] sql: replace control pragmas by SET

Mergen Imeev imeevma at tarantool.org
Wed Nov 27 14:24:37 MSK 2019


On Wed, Nov 27, 2019 at 02:10:30PM +0300, Konstantin Osipov wrote:
> * Mergen Imeev <imeevma at tarantool.org> [19/11/27 14:07]:
> > > Usually, if one allows SET statement, SET option_name (without 
> > > "= new_value") prints the current setting. This does the job and
> > > makes the "_vsettings" system view unnecessary.
> > > 
> > > Don't you think that having to use one piece of syntax to query a
> > > value and entirely different piece to assign it is, ehm,
> > > inconsistent, hard to learn & remember, and eventually hard to
> > > use?
> > > 
> > You are right. This was also pointed by Vlad in previous
> > review:
> > "2. Ok, but now it looks really unusable when a user want's to
> > learn an option value. I will create a ticket, if this patchset
> > will be pushed and nobody will care about usability beforehand."
> 
> But how are you going to fix it? By making SET statement powerful
> enough to query a value or by making the sysview updatable?
> 
Since all settings are saved in a “struct session”, I
think that I will use the same methods PRAGMA used. The
system view reads from current_session(), so SET will
also read from there.

> Either way you fix it, the second patch will become unnecessary,
> don't you think?
> 
The main idea of the patch is to allow to see the session
settings from any interface. It’s just that at the moment
it only has SQL parameters as session parameters.

> > Personally, I think this is easy to fix, and your
> > suggestion is good. In fact, I can fix this in this
> > patch-set if Vlad and Nikita agree with this solution.
> 
> -- 
> Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list