Re: Properly mark NULL returns in numeric aggregates
| От | Tom Lane |
|---|---|
| Тема | Re: Properly mark NULL returns in numeric aggregates |
| Дата | |
| Msg-id | 12009.1586559587@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Properly mark NULL returns in numeric aggregates (Jesse Zhang <sbjesse@gmail.com>) |
| Ответы |
Re: Properly mark NULL returns in numeric aggregates
|
| Список | pgsql-hackers |
Jesse Zhang <sbjesse@gmail.com> writes:
> On the other hand, we examined the corresponding final functions
> (numeric_stddev_pop and friends), they all seem to carefully treat a
> NULL trans value the same as a "zero input" (as in, state.N == 0 &&
> state.NaNcount ==0). That does suggest to me that it should be fine to
> declare those combine functions as strict (barring the restriction that
> they should not be STRICT, anybody remembers why?).
They can't be strict because the initial iteration needs to produce
something from a null state and non-null input. nodeAgg's default
behavior won't work for those because nodeAgg doesn't know how to
copy a value of type "internal".
regards, tom lane
В списке pgsql-hackers по дате отправления: