aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/sql/create_aggregate.sql
blob: 22630c013edacf174259b314084e3771c4d3c562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--
-- AGGREGATE DEFINITIONS
--

-- all functions CREATEd
CREATE AGGREGATE newavg (
   sfunc1 = int4pl, basetype = int4, stype1 = int4, 
   sfunc2 = int4inc, stype2 = int4,
   finalfunc = int4div,
   initcond1 = '0', initcond2 = '0'
);

-- sfunc1 (value-dependent) only 
CREATE AGGREGATE newsum (
   sfunc1 = int4pl, basetype = int4, stype1 = int4, 
   initcond1 = '0'
);

-- sfunc2 (value-independent) only 
CREATE AGGREGATE newcnt (
   sfunc2 = int4inc, basetype = int4, stype2 = int4, 
   initcond2 = '0'
);