Re: Properly mark NULL returns in numeric aggregates - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Properly mark NULL returns in numeric aggregates
Date
Msg-id 31733.1586549996@sss.pgh.pa.us
Whole thread Raw
In response to Re: Properly mark NULL returns in numeric aggregates  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2020-04-09 16:22:11 -0700, Jesse Zhang wrote:
>> We found that several functions -- namely numeric_combine,
>> numeric_avg_combine, numeric_poly_combine, and int8_avg_combine -- are
>> returning NULL without signaling the nullity of datum in fcinfo.isnull.
>> This is obscured by the fact that the only functions in core (finalfunc
>> for various aggregates) that those return values feed into happen to
>> tolerate (or rather, not quite distinguish) zero-but-not-NULL trans
>> values.

> Shouldn't these just be marked as strict?

No, certainly not --- they need to be able to act on null inputs.
The question is how careful do we need to be about representing
null results as "real" nulls rather than NULL pointers.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "Bossart, Nathan"
Date:
Subject: pg_dump issue with renamed system schemas
Next
From: Tom Lane
Date:
Subject: Re: spin_delay() for ARM