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

From: Caleb Welton <cwelton(at)greenplum(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Transition functions for SUM(::int2), SUM(::int4, SUM(::int8])
Date: 2008-01-28 23:57:40
Message-ID: C3C3ABF4.123%cwelton@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is there any reason that int2_sum, int4_sum, and int8_sum are not marked as
being strict? All the other transition functions for sum, and every other
built in aggregation function is marked as strict, as demonstrated with:

select x.proname, t.proname, t.proisstrict
from ((pg_aggregate a left join
pg_proc x on (a.aggfnoid = x.oid)) left join
pg_proc t on (a.aggtransfn = t.oid))
where not t.proisstrict;

proname | proname | proisstrict
---------+----------+-------------
sum | int2_sum | f
sum | int4_sum | f
sum | int8_sum | f

select x.proname, t.proname, t.proisstrict
from ((pg_aggregate a left join
pg_proc x on (a.aggfnoid = x.oid)) left join
pg_proc t on (a.aggtransfn = t.oid))
where x.proname = 'sum';

proname | proname | proisstrict
---------+-------------+-------------
sum | int8_sum | f
sum | int4_sum | f
sum | int2_sum | f
sum | float4pl | t
sum | float8pl | t
sum | cash_pl | t
sum | interval_pl | t
sum | numeric_add | t
(8 rows)

Thanks,
Caleb

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-01-28 23:59:09 Re: Strange locking choices in pg_shdepend.c
Previous Message Simon Riggs 2008-01-28 23:51:54 Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable