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 704DE286C0 for ; Tue, 5 Mar 2019 10:44:07 -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 Pn2LQXyZz4sK for ; Tue, 5 Mar 2019 10:44:07 -0500 (EST) Received: from smtp37.i.mail.ru (smtp37.i.mail.ru [94.100.177.97]) (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 26B572794B for ; Tue, 5 Mar 2019 10:44:07 -0500 (EST) Date: Tue, 5 Mar 2019 18:44:04 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v3 9/9] sql: remove sqlErrorMsg() Message-ID: <20190305154404.GB6860@chai> References: <35851381-BED4-4B82-923B-20D0984504E1@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35851381-BED4-4B82-923B-20D0984504E1@tarantool.org> 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 * n.pettik [19/03/05 18:26]: > > @@ -392,14 +392,25 @@ lookupName(Parse * pParse, /* The parsing context */ > > pOrig = pEList->a[j].pExpr; > > if ((pNC->ncFlags & NC_AllowAgg) == 0 > > && ExprHasProperty(pOrig, EP_Agg)) { > > - sqlErrorMsg(pParse, > > - "misuse of aliased aggregate %s", > > - zAs); > > + const char *err_msg = > > + tt_sprintf("misuse of "\ > > + "aliased "\ > > + "aggregate "\ > > + "%s", zAs); > > Such formatting looks terrible. Lets break 80 border or move > declaration of this error msg at few blocks above. It's not the formatting, it's that the problem calls for splitting this function into a few smaller ones. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov