On Tue, Mar 8, 2016 at 3:52 PM, Fabien COELHO <coe...@cri.ensmp.fr> wrote: > [ new patch and assorted color commentary ]
This is not acceptable: + /* guess double type (n for "inf", "-inf" and "nan") */ + if (strchr(var, '.') != NULL || strchr(var, 'n') != NULL) + { + double dv; + sscanf(var, "%lf", &dv); + setDoubleValue(retval, dv); + } + else + setIntValue(retval, strtoint64(var)); That totally breaks the error handling which someone carefully established here. + PgBenchValue *varg = & vargs[0]; Extra space. + if (!coerceToDouble(st, & vargs[0], &dval)) + return false; Another extra space. - int nargs = 0; - int64 iargs[MAX_FARGS]; - PgBenchExprLink *l = args; + int nargs = 0; + PgBenchValue vargs[MAX_FARGS]; + PgBenchExprLink *l = args; Completely unnecessary reindentation of the first and third lines. + setIntValue(retval, i < 0? -i: i); Not project style. Please fix the whitespace damage git diff --check complains about, and check for other places where you haven't followed project style. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers