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 DEBEC246D5 for ; Tue, 26 Feb 2019 10:59:20 -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 B2l_dOOYSij3 for ; Tue, 26 Feb 2019 10:59:20 -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 4D4FC245B3 for ; Tue, 26 Feb 2019 10:59:20 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v2 2/5] sql: rework syntax errors References: <20190226082405.GA2696@chai> From: Imeev Mergen Message-ID: Date: Tue, 26 Feb 2019 18:59:17 +0300 MIME-Version: 1.0 In-Reply-To: <20190226082405.GA2696@chai> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Transfer-Encoding: 8bit Content-Language: en-US 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: Konstantin Osipov , tarantool-patches@freelists.org Hi! Thank you for review. My answer below On 2/26/19 11:24 AM, Konstantin Osipov wrote: > * n.pettik [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 also requested to add line/character > numbers to the error message, which I don't see in the patch. > > Mergen, did you find that this is not possible to do? As far as I understand, this is not yet possible. All '\ n' are currently treated as spaces. To change this, we need to define a new character class in tokenize.c and make all related changes to the parser. I do not think that this should be done in issue 3965. May I mention this later as a follow-up of the issue? > >