Re: Wrong aggregate result when sorting by a NULL value

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Wrong aggregate result when sorting by a NULL value
Дата
Msg-id 20181104234410.f63uu33kfxy2zgjx@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Wrong aggregate result when sorting by a NULL value  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Wrong aggregate result when sorting by a NULL value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2018-11-04 11:19:59 -0500, Tom Lane wrote:
> 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.

Thanks.  I wonder if we shouldn't turn Asserts() into something roughly
akin to if (0) {expr};. That way we'd not deal with errors about unused
variables anymore - we're not safe against unreachable code warnings
anyway.

Greetings,

Andres Freund


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Wrong aggregate result when sorting by a NULL value
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Wrong aggregate result when sorting by a NULL value