mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Provide moving-aggregate support for a bunch of numerical aggregates.
First installment of the promised moving-aggregate support in built-in aggregates: count(), sum(), avg(), stddev() and variance() for assorted datatypes, though not for float4/float8. In passing, remove a 2001-vintage kluge in interval_accum(): interval array elements have been properly aligned since around 2003, but nobody remembered to take out this workaround. Also, fix a thinko in the opr_sanity tests for moving-aggregate catalog entries. David Rowley and Florian Pflug, reviewed by Dean Rasheed
This commit is contained in:
@@ -1005,9 +1005,13 @@ extern Datum float4_numeric(PG_FUNCTION_ARGS);
|
||||
extern Datum numeric_float4(PG_FUNCTION_ARGS);
|
||||
extern Datum numeric_accum(PG_FUNCTION_ARGS);
|
||||
extern Datum numeric_avg_accum(PG_FUNCTION_ARGS);
|
||||
extern Datum numeric_accum_inv(PG_FUNCTION_ARGS);
|
||||
extern Datum int2_accum(PG_FUNCTION_ARGS);
|
||||
extern Datum int4_accum(PG_FUNCTION_ARGS);
|
||||
extern Datum int8_accum(PG_FUNCTION_ARGS);
|
||||
extern Datum int2_accum_inv(PG_FUNCTION_ARGS);
|
||||
extern Datum int4_accum_inv(PG_FUNCTION_ARGS);
|
||||
extern Datum int8_accum_inv(PG_FUNCTION_ARGS);
|
||||
extern Datum int8_avg_accum(PG_FUNCTION_ARGS);
|
||||
extern Datum numeric_avg(PG_FUNCTION_ARGS);
|
||||
extern Datum numeric_sum(PG_FUNCTION_ARGS);
|
||||
@@ -1020,7 +1024,10 @@ extern Datum int4_sum(PG_FUNCTION_ARGS);
|
||||
extern Datum int8_sum(PG_FUNCTION_ARGS);
|
||||
extern Datum int2_avg_accum(PG_FUNCTION_ARGS);
|
||||
extern Datum int4_avg_accum(PG_FUNCTION_ARGS);
|
||||
extern Datum int2_avg_accum_inv(PG_FUNCTION_ARGS);
|
||||
extern Datum int4_avg_accum_inv(PG_FUNCTION_ARGS);
|
||||
extern Datum int8_avg(PG_FUNCTION_ARGS);
|
||||
extern Datum int2int4_sum(PG_FUNCTION_ARGS);
|
||||
extern Datum width_bucket_numeric(PG_FUNCTION_ARGS);
|
||||
extern Datum hash_numeric(PG_FUNCTION_ARGS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user