Re: Wrong aggregate result when sorting by a NULL value

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Andrew Gierth <andrew@tao11.riddles.org.uk>, obouda@email.cz, Pg Bugs <pgsql-bugs@postgresql.org>
Date: 2018-11-04T16:19:59Z
Lists: pgsql-bugs
Jeff Janes <jeff.janes@gmail.com> writes:
> I'm now getting a compiler warning:

> execExpr.c: In function 'ExecBuildAggTrans':
> execExpr.c:2864:7: warning: unused variable 'numInputs' [-Wunused-variable]
>    int   numInputs = pertrans->numInputs;

Used-for-asserts-only problem.  Will fix.

			regards, tom lane


Commits

  1. Fix unused-variable warning.

  2. Prevent generating EEOP_AGG_STRICT_INPUT_CHECK operations when nargs == 0.

  3. Fix STRICT check for strict aggregates with NULL ORDER BY columns.

  4. Expression evaluation based aggregate transition invocation.