From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 60E3D20569 for ; Tue, 26 Feb 2019 07:59:08 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ETbJySHoHLAN for ; Tue, 26 Feb 2019 07:59:08 -0500 (EST) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 1FB5320257 for ; Tue, 26 Feb 2019 07:59:08 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: [tarantool-patches] Re: [PATCH v2 2/5] sql: rework syntax errors From: "n.pettik" In-Reply-To: <20190226082405.GA2696@chai> Date: Tue, 26 Feb 2019 15:59:05 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <8042E409-CC3B-42D5-9255-FE3E6ED8B517@tarantool.org> References: <20190226082405.GA2696@chai> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Imeev Mergen , Konstantin Osipov > On 26 Feb 2019, at 11:24, Konstantin Osipov = wrote: >=20 > * n.pettik [19/02/25 23:05]: >> Quite strange name for err code. >> I=E2=80=99d rather say ER_SQL_UNRECOGNIZED_SYMBOL/SYNTAX. >> Is this message suggested by Konstantin? To be honest, I would >> prefer old one. =E2=80=9CUnrecognized syntax=E2=80=9D doesn=E2=80=99t = sound good and clear enough, >> at least for me. Personally I would say =E2=80=9CSyntax error near = %s=E2=80=9D. >> The last one is used in several DBs, so I suppose it is common way to = raise >> errors like that. >=20 > Yes, the name is suggested by me. There is a name clash with a > generic ER_SYNTAX_ERROR. I don=E2=80=99t see problem here. First error is =E2=80=9CSyntax error = in %s : %s=E2=80=9D. For instance, =E2=80=9CSyntax error in trigger body : blah-blah=E2=80=9D. Second one is =E2=80=9CSyntax error near %s=E2=80=9D or =E2=80=9CSyntax = error near %s token=E2=80=9D. For instance, =E2=80=9CSyntax error near =E2=80=9Ccreate=E2=80=9D = token.=E2=80=9D Ok, if you still want to use =E2=80=99syntax=E2=80=99 word, then at = least let=E2=80=99s use this variant: =E2=80=9CIncorrect syntax near %s" I failed to find any compiler or db which generate =E2=80=9CUnrecognized syntax =E2=80=A6=E2=80=9D 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=E2=80=99t have multi-line processing.