diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-07-17 03:05:41 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-07-17 03:05:41 +0000 |
commit | bec98a31c55a4f799b398d01541e68d7c086bb81 (patch) | |
tree | 14924bb5da2bc0a0f9bfac1aa5b32256fd996b9c /src/tutorial | |
parent | 139f19c30221968e7d3bf64fe303cb41517e4601 (diff) | |
download | postgresql-bec98a31c55a4f799b398d01541e68d7c086bb81.tar.gz postgresql-bec98a31c55a4f799b398d01541e68d7c086bb81.zip |
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...
Diffstat (limited to 'src/tutorial')
-rw-r--r-- | src/tutorial/complex.source | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tutorial/complex.source b/src/tutorial/complex.source index 361007ced9d..e0859a67976 100644 --- a/src/tutorial/complex.source +++ b/src/tutorial/complex.source @@ -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; |