5
-- all functions CREATEd
6
CREATE AGGREGATE newavg (
7
sfunc = int4_accum, basetype = int4, stype = _numeric,
8
finalfunc = numeric_avg,
13
COMMENT ON AGGREGATE newavg_wrong (int4) IS 'an agg comment';
14
COMMENT ON AGGREGATE newavg (int4) IS 'an agg comment';
15
COMMENT ON AGGREGATE newavg (int4) IS NULL;
17
-- without finalfunc; test obsolete spellings 'sfunc1' etc
18
CREATE AGGREGATE newsum (
19
sfunc1 = int4pl, basetype = int4, stype1 = int4,
23
-- value-independent transition function
24
CREATE AGGREGATE newcnt (
25
sfunc = int4inc, basetype = 'any', stype = int4,
29
COMMENT ON AGGREGATE nosuchagg (*) IS 'should fail';
30
COMMENT ON AGGREGATE newcnt (*) IS 'an any agg comment';
31
COMMENT ON AGGREGATE newcnt (*) IS NULL;