From: "n.pettik" <korablev@tarantool.org> To: tarantool-patches@freelists.org Cc: Imeev Mergen <imeevma@tarantool.org>, Konstantin Osipov <kostja@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v2 2/5] sql: rework syntax errors Date: Tue, 26 Feb 2019 15:59:05 +0300 [thread overview] Message-ID: <8042E409-CC3B-42D5-9255-FE3E6ED8B517@tarantool.org> (raw) In-Reply-To: <20190226082405.GA2696@chai> > On 26 Feb 2019, at 11:24, Konstantin Osipov <kostja@tarantool.org> wrote: > > * n.pettik <korablev@tarantool.org> [19/02/25 23:05]: >> Quite strange name for err code. >> I’d rather say ER_SQL_UNRECOGNIZED_SYMBOL/SYNTAX. >> Is this message suggested by Konstantin? To be honest, I would >> prefer old one. “Unrecognized syntax” doesn’t sound good and clear enough, >> at least for me. Personally I would say “Syntax error near %s”. >> The last one is used in several DBs, so I suppose it is common way to raise >> errors like that. > > 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. > 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.
next prev parent reply other threads:[~2019-02-26 12:59 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 [this message] 2019-02-26 13:12 ` Konstantin Osipov 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=8042E409-CC3B-42D5-9255-FE3E6ED8B517@tarantool.org \ --to=korablev@tarantool.org \ --cc=imeevma@tarantool.org \ --cc=kostja@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