From: Patrick J. P. G. <pat...@us...> - 2000-10-17 05:43:52
|
Update of /cvsroot/firebird/interbase/dsql In directory slayer.i.sourceforge.net:/tmp/cvs-serv23075/interbase/dsql Modified Files: gen.c Log Message: The build in functions AVG(x) and SUM(x) when used on integer fields can produce result columns with no title. For example: SQL> show table p; PNO VARCHAR(6) Nullable PNAME VARCHAR(20) Nullable COLOR VARCHAR(6) Nullable WEIGHT INTEGER Nullable CITY VARCHAR(15) Nullable SQL> select avg(weight) from p; ===================== 15 SQL> The coding for the titles of these two fields was conditionally compiled according to the EXACT_NUMERIC definition, which was never set. The #ifdef has been removed so that this coding is always compiled. (A very similar EXACT_NUMERICS is defined for HP10 and solaris builds, but this coding seems to be independent of this problem.) pat Index: gen.c =================================================================== RCS file: /cvsroot/firebird/interbase/dsql/gen.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** gen.c 2000/09/28 15:06:50 1.4 --- gen.c 2000/10/17 05:43:49 1.5 *************** *** 2094,2103 **** else if (map_node->nod_type == nod_agg_average) parameter->par_name = parameter->par_alias = "AVG"; - #ifdef EXACT_NUMERIC else if (map_node->nod_type == nod_agg_total2) parameter->par_name = parameter->par_alias = "SUM"; else if (map_node->nod_type == nod_agg_average2) parameter->par_name = parameter->par_alias = "AVG"; - #endif else if (map_node->nod_type == nod_agg_min) parameter->par_name = parameter->par_alias = "MIN"; --- 2094,2101 ---- |