From: Peter Gulutzan <pgulutzan@ocelot.ca> To: Chris Sosnin <k.sosnin@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 0/4] session settings fixes Date: Wed, 8 Apr 2020 08:36:03 -0600 [thread overview] Message-ID: <1bdafb31-b8bf-db2f-023a-41ed4207d5d5@ocelot.ca> (raw) In-Reply-To: <1433D33E-327F-4365-BB52-8BB9C6B539D5@tarantool.org> Hi, On 2020-04-07 10:32 a.m., Chris Sosnin wrote: > Hi! > >> On 3 Apr 2020, at 20:09, Peter Gulutzan <pgulutzan@ocelot.ca> wrote: >> >> Hi, >> >> Re: >> SETTING SET "sql_default_engine" = 'memtx'; >> >> Adding a new reserved word SETTING, without advance notice, >> should be against policy. It causes a slight risk >> of breaking an existing application. >> >> I had hoped for >> UPDATE _SETTINGS_DEFAULT_ENGINE SET VALUE = 'memtx'; > > Implementing this syntax would either require creating a table for each setting > or adding new keywords, since this is the same as updating tables. > It would definitely require creating a (viewed) table for each setting. That is why I said "And similarly for sql_defer_foreign_keys etc." > Moreover, SET VALUE construction also is not supported, so we still need > to reserve a new word. > As I pointed out in my earlier email, I can say UPDATE _settings_default_engine SET value = 'memtx'; now, in a current Tarantool version, without a parser error. If _settings_default_engine is not a view, it works fine. So I didn't see why there is a need to reserve VALUE. (Digression: That does not mean I like using VALUE for a column name. I objected about it in an earlier email. But I did not propose a better name, and now it is too late.) > We can borrow another MySQL syntax — SET SESSION name = value > What do you think about this option? In MySQL, SESSION is not a reserved word. Let us go back to my original complaint. CREATE TABLE setting (setting INTEGER PRIMARY KEY); That statement is legal in Tarantool-2.4. That statement is illegal in branch ksosnin/gh-4712-session-settings-v2. If you say SET SESSION instead of SETTING SET, is there still a need to add a new reserved word without notice? (Digression: Currently, every word that can be the start of a statement is reserved. Also, a few words that might in future be the start of a statement are reserved -- ANALYZE, BEGIN, CALL, DECLARE, END, FETCH, FOR, GRANT, IF, ITERATE, LEAVE, LOOP, RENAME, REPEAT, RESIGNAL, REVOKE, SET, SIGNAL. I believe that is a good thing. I do not believe that SETTING should be unreserved if it is the start of a statement.) Peter Gulutzan
next prev parent reply other threads:[~2020-04-08 14:36 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-03 17:09 Peter Gulutzan 2020-04-03 18:11 ` Timur Safin 2020-04-07 16:32 ` Chris Sosnin 2020-04-08 9:40 ` Timur Safin 2020-04-08 15:03 ` Peter Gulutzan 2020-04-08 14:36 ` Peter Gulutzan [this message] -- strict thread matches above, loose matches on Subject: below -- 2020-03-30 9:13 Chris Sosnin 2020-04-02 9:14 ` Timur Safin 2020-04-02 10:18 ` Chris Sosnin 2020-04-03 12:47 ` Nikita Pettik 2020-04-03 13:09 ` Nikita Pettik 2020-04-03 14:02 ` Chris Sosnin 2020-04-13 14:18 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1bdafb31-b8bf-db2f-023a-41ed4207d5d5@ocelot.ca \ --to=pgulutzan@ocelot.ca \ --cc=k.sosnin@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 0/4] session settings fixes' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox