Re: Properly mark NULL returns in numeric aggregates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Jesse Zhang <sbjesse(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Denis Smirnov <sd(at)arenadata(dot)io>, Soumyadeep Chakraborty <sochakraborty(at)pivotal(dot)io>
Subject: Re: Properly mark NULL returns in numeric aggregates
Date: 2020-04-14 15:41:23
Message-ID: 21646.1586878883@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> For testing, can't we just have an Assert() in
> advance_transition_function that verifies isnull matches the
> nullability of the return value for INTERNAL returning transfns? i.e,
> the attached

FTR, I do not like this Assert one bit. nodeAgg.c has NO business
inquiring into the contents of internal-type Datums. It has even
less business enforcing a particular Datum value for a SQL null ---
we have always, throughout the system, considered that if isnull
is true then the contents of the Datum are unspecified. I think
this is much more likely to cause problems than solve any.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2020-04-14 15:41:44 PG compilation error with Visual Studio 2015/2017/2019
Previous Message Robert Haas 2020-04-14 15:38:03 Re: where should I stick that backup?