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

Konstantin Osipov kostja.osipov at gmail.com
Thu Nov 28 15:31:20 MSK 2019


* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/11/28 10:29]:
> > 3) If we move sysview out of the problem, where should we move it.
> 
> To /dev/null. Together with all the other SQL.

Wow, wow, easy please ;)

It's always a question of tradeoffs, price/performance, etc.

Even as it is now SQL is quite useful for BETWEEN, IN,
open-bounded predicate + small limit queries. Someone will need to
prepare a benchmark, of course, but eventually it will happen.

There are a few remaining issues out there to make it more broadly
useful, safe foreign keys, information_schema views and remaining
issues with strong typing are high on my list.

But here, the price/value ratio is ... high.

Much faster and easier to replace keyword PRAGMA if someone
doesn't like it with keyword SET, and be done with it. 

Besides, Mergen has prepared some cool SQL refactoring patches like 
removing some pragmas altogether which
need to be looked at - they are bringing value regardless of
whether there is consensus on the syntax for SQL settings.

One must also admit there is some compose-ability value of SELECT
over SET <value>; SELECT is usable in a join or a view.

But you can easily work this around by lua('') generic built-in
function, you can do lua('box.sql.exeucte("set <value")')

BTW, this lua() function is very neat - it is a good enough
workaround for
anything-you-want-to-have-in-sql-but-have-no-native-keyword-for.

-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list