From: Konstantin Osipov <kostja@tarantool.org> To: "n.pettik" <korablev@tarantool.org> Cc: tarantool-patches@freelists.org, Imeev Mergen <imeevma@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v2 2/5] sql: rework syntax errors Date: Tue, 26 Feb 2019 16:12:17 +0300 [thread overview] Message-ID: <20190226131217.GH5592@chai> (raw) In-Reply-To: <8042E409-CC3B-42D5-9255-FE3E6ED8B517@tarantool.org> * n.pettik <korablev@tarantool.org> [19/02/26 16:02]: > > Yes, the name is suggested by me. There is a name clash with a > > generic ER_SYNTAX_ERROR. > > I don’t see problem here. First error is “Syntax error in %s : %s”. > For instance, “Syntax error in trigger body : blah-blah”. > Second one is “Syntax error near %s” or “Syntax error near %s token”. > For instance, “Syntax error near “create” token.” > Ok, if you still want to use ’syntax’ word, then at least let’s use > this variant: “Incorrect syntax near %s" > > I failed to find any compiler or db which generate > “Unrecognized syntax …” error messages. Ok, if you ask me what's better - syntax error vs. unrecognized syntax - up to you, it doesn't really matter. Let's ensure two properties: - the grammar and punctuation are correct - the message is as specific as possible, i.e. allows the user to easily identify location of the error. Don't assume there is a single-line statement, assume 1 select statement can easily be 200 lines of highly nested code. > > > I also requested to add line/character > > numbers to the error message, which I don't see in the patch. > > Line is useless now, we don’t have multi-line processing. We do. tarantool> box.sql.execute("select\n\n\n1") --- - - [1] ... -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov
next prev parent reply other threads:[~2019-02-26 13:12 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-25 17:14 [tarantool-patches] [PATCH v2 0/5] sql: use diag_set() for errors in SQL imeevma 2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 1/5] sql: remove "syntax error after column name" error imeevma 2019-02-25 19:34 ` [tarantool-patches] " n.pettik 2019-02-27 11:32 ` Kirill Yukhin 2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 2/5] sql: rework syntax errors imeevma 2019-02-25 20:02 ` [tarantool-patches] " n.pettik 2019-02-26 8:24 ` Konstantin Osipov 2019-02-26 12:59 ` n.pettik 2019-02-26 13:12 ` Konstantin Osipov [this message] 2019-02-26 15:59 ` Imeev Mergen 2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 3/5] sql: save SQL parser errors in diag_set() imeevma 2019-02-25 23:01 ` [tarantool-patches] " n.pettik 2019-02-26 8:25 ` Konstantin Osipov 2019-02-26 15:29 ` Imeev Mergen 2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 4/5] sql: remove file zErrMsg of struct Parse imeevma 2019-02-26 14:47 ` [tarantool-patches] " n.pettik 2019-02-26 15:36 ` Imeev Mergen 2019-02-26 18:17 ` n.pettik 2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 5/5] sql: remove field nErr " imeevma 2019-02-26 8:27 ` [tarantool-patches] " Konstantin Osipov 2019-02-26 14:48 ` n.pettik
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=20190226131217.GH5592@chai \ --to=kostja@tarantool.org \ --cc=imeevma@tarantool.org \ --cc=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v2 2/5] sql: rework syntax errors' \ /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