1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-11 20:28:21 +03:00

Revise aggregate functions per earlier discussions in pghackers.

There's now only one transition value and transition function.
NULL handling in aggregates is a lot cleaner.  Also, use Numeric
accumulators instead of integer accumulators for sum/avg on integer
datatypes --- this avoids overflow at the cost of being a little slower.
Implement VARIANCE() and STDDEV() aggregates in the standard backend.

Also, enable new LIKE selectivity estimators by default.  Unrelated
change, but as long as I had to force initdb anyway...
This commit is contained in:
Tom Lane
2000-07-17 03:05:41 +00:00
parent 139f19c302
commit bec98a31c5
55 changed files with 1949 additions and 1813 deletions

View File

@ -7,7 +7,7 @@
--
-- Copyright (c) 1994, Regents of the University of California
--
-- $Id: complex.source,v 1.7 2000/03/28 02:49:19 tgl Exp $
-- $Id: complex.source,v 1.8 2000/07/17 03:05:41 tgl Exp $
--
---------------------------------------------------------------------------
@ -111,10 +111,10 @@ SELECT a + '(1.0,1.0)'::complex AS aa,
-----------------------------
CREATE AGGREGATE complex_sum (
sfunc1 = complex_add,
sfunc = complex_add,
basetype = complex,
stype1 = complex,
initcond1 = '(0,0)'
stype = complex,
initcond = '(0,0)'
);
SELECT complex_sum(a) FROM test_complex;