From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Mergen Imeev <imeevma@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH v3 3/5] sql: introduce SET statement
Date: Sun, 17 Nov 2019 21:32:17 +0100 [thread overview]
Message-ID: <194ae7ab-61bc-797a-527e-81704ade2545@tarantool.org> (raw)
In-Reply-To: <3d76e64a-cd03-1bf1-5830-0d0b142a5e27@tarantool.org>
I was thinking about it, and realized, that SET is
really castrated. For example:
box.cfg{}
box.execute('CREATE TABLE test (id INTEGER PRIMARY KEY, a BOOLEAN)')
box.execute('INSERT INTO test VALUES (1, TRUE)')
tarantool> box.execute('UPDATE test SET a = FALSE AND TRUE')
---
- row_count: 1
...
This UPDATE SET works. Settings SET does not work:
tarantool> box.execute('SET sql_full_column_names = FALSE AND TRUE;')
---
- null
- Keyword 'AND' is reserved. Please use double quotes if 'AND' is an identifier.
...
I think we need to make them working the same. We can't expect that a user
will always pass a trivial constant boolean value.
Binding also does not work:
tarantool> box.execute('SET sql_full_column_names = ?;', {true})
---
- null
- Syntax error near '?'
...
And as well, we can't force a user to always concatenate its
settings into a query string. At least this is not safe.
But I think this might be moved to 4621 issue. Because PRAGMA
also does not understand complex expressions, nor bound
parameters.
next prev parent reply other threads:[~2019-11-17 20:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-07 10:36 [Tarantool-patches] [PATCH v3 0/5] Replace control pragmas by SET imeevma
2019-11-07 10:36 ` [Tarantool-patches] [PATCH v3 1/5] sysview: make get() and create_iterator() methods virtual imeevma
2019-11-07 10:36 ` [Tarantool-patches] [PATCH v3 2/5] box: introdice _vsession_settings sysview imeevma
2019-11-07 10:36 ` [Tarantool-patches] [PATCH v3 3/5] sql: introduce SET statement imeevma
2019-11-07 12:40 ` Vladislav Shpilevoy
2019-11-07 14:12 ` Mergen Imeev
2019-11-11 21:56 ` Vladislav Shpilevoy
2019-11-15 14:06 ` Mergen Imeev
2019-11-17 17:26 ` Vladislav Shpilevoy
2019-11-17 20:32 ` Vladislav Shpilevoy [this message]
2019-11-27 10:33 ` Mergen Imeev
2019-11-27 23:03 ` Vladislav Shpilevoy
2019-11-27 23:07 ` Vladislav Shpilevoy
2019-11-27 23:09 ` Vladislav Shpilevoy
2019-11-28 8:59 ` Mergen Imeev
2019-11-28 8:56 ` Mergen Imeev
2019-11-07 10:36 ` [Tarantool-patches] [PATCH v3 4/5] temporary: disable boolean.test.sql imeevma
2019-11-07 10:37 ` [Tarantool-patches] [PATCH v3 5/5] sql: replace control pragmas imeevma
2019-12-06 11:37 ` [Tarantool-patches] [PATCH v3 0/5] Replace control pragmas by SET Kirill Yukhin
2019-12-06 13:50 ` Mergen Imeev
2019-12-06 14:06 ` Sergey Ostanevich
2019-12-17 22:11 ` Alexander Turenko
2019-12-18 2:39 ` Peter Gulutzan
2019-12-18 17:39 ` Peter Gulutzan
2019-12-19 9:59 ` Mergen Imeev
2019-12-19 17:35 ` Peter Gulutzan
2019-12-19 17:51 ` Mergen Imeev
2019-12-19 21:09 ` Vladislav Shpilevoy
2019-12-18 10:20 ` Kirill Yukhin
2019-12-18 10:53 ` Alexander Turenko
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=194ae7ab-61bc-797a-527e-81704ade2545@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=imeevma@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v3 3/5] sql: introduce SET statement' \
/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