Re: Transition functions for SUM(::int2), SUM(::int4, SUM(::int8]) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Transition functions for SUM(::int2), SUM(::int4, SUM(::int8])
Date
Msg-id 25794.1201640819@sss.pgh.pa.us
Whole thread Raw
In response to Transition functions for SUM(::int2), SUM(::int4, SUM(::int8])  (Caleb Welton <cwelton@greenplum.com>)
List pgsql-hackers
Caleb Welton <cwelton@greenplum.com> writes:
> Forgive me if I'm being dense, but could you explain why

> int4_sum(bigint,int) must not be strict, but
> int4_avg_accum(bytea, int) can be strict?

The former is used with a NULL initial value, the latter isn't.
Read the fine print in the CREATE AGGREGATE man page about behavior
with strict transition functions.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable
Next
From: Cristian Gafton
Date:
Subject: Re: Large pgstat.stat file causes I/O storm