[Tarantool-discussions] SQL built-in functions position

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Mon Sep 28 23:07:50 MSK 2020


Hi!

See my response in another email with 4 big reasons why
storage of SQL-specific functions in _func is a bad idea.

Also see responses on your comments in separate sections.
I leave references below.

On 28.09.2020 20:19, Nikita Pettik wrote:
> On 27 Sep 18:18, Mergen Imeev wrote:
>> Hi all. I have a question that I would like to discuss.
>>
>> The question is about SQL built-in functions. At the moment these functions
>> are
>> partially described in _func and partially in src/box/sql/func.c. I received
>> two
>> completely different suggestions from my reviewers on what to do with these
>> functions:
>> 1) Move definitions completely to _func. Remove definitions from func.c.
> 
> That's my proposal. It makes name collisions check simple,

See "## Built-in functions prevent duplicates in _func?".

> provides unified interface to invoke built-in and non-built-in functions,

See "## Storage in _func unifies functions?".

> allows to grant and verify priveleges in the same way and so forth.

See "## Built-in functions require privileges?".

> Built-ins are already declaraed in _func, so reverting this thing would result> in another one unnecessary schema change and upgrade (so I doubt that implementation would
> be somehow 'simpler').

See "## Storage in _func does not change _func schema and documentation?".

> Finally part of functions can turn out to be really
> usefull in Lua someday such as date()/time().

See "## Reuse SQL functions in Lua and other languages?".

> So to me the choice is kind
> of obvious..

It still is not to me.


More information about the Tarantool-discussions mailing list