Re: Transition functions for SUM(::int2), SUM(::int4, SUM(::int8])

From: Caleb Welton <cwelton(at)greenplum(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Transition functions for SUM(::int2), SUM(::int4, SUM(::int8])
Date: 2008-01-29 20:58:39
Message-ID: C3C4D37F.140%cwelton@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks Tom,

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?

It seems that both of them have transition datatypes that are different from
the input.

-Caleb

On 1/28/08 7:31 PM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Caleb Welton <cwelton(at)greenplum(dot)com> writes:
>> Is there any reason that int2_sum, int4_sum, and int8_sum are not marked as
>> being strict?
>
> They wouldn't work otherwise, because the transition datatypes aren't
> the same as the inputs.
>
> regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-01-29 21:00:49 Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable
Previous Message Kevin Grittner 2008-01-29 20:35:36 Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable