[tarantool-patches] Re: [PATCH v3 9/9] sql: remove sqlErrorMsg()

Konstantin Osipov kostja at tarantool.org
Tue Mar 5 18:44:04 MSK 2019


* n.pettik <korablev at tarantool.org> [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




More information about the Tarantool-patches mailing list