summaryrefslogtreecommitdiff
path: root/src/test/regress/sql/create_aggregate.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/regress/sql/create_aggregate.sql')
-rw-r--r--src/test/regress/sql/create_aggregate.sql34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/test/regress/sql/create_aggregate.sql b/src/test/regress/sql/create_aggregate.sql
index c98c154a829..ae3a6c0ebec 100644
--- a/src/test/regress/sql/create_aggregate.sql
+++ b/src/test/regress/sql/create_aggregate.sql
@@ -117,27 +117,11 @@ CREATE AGGREGATE sumdouble (float8)
-- aggregate combine and serialization functions
--- Ensure stype and serialtype can't be the same
+-- can't specify just one of serialfunc and deserialfunc
CREATE AGGREGATE myavg (numeric)
(
stype = internal,
sfunc = numeric_avg_accum,
- serialtype = internal
-);
-
--- if serialtype is specified we need a serialfunc and deserialfunc
-CREATE AGGREGATE myavg (numeric)
-(
- stype = internal,
- sfunc = numeric_avg_accum,
- serialtype = bytea
-);
-
-CREATE AGGREGATE myavg (numeric)
-(
- stype = internal,
- sfunc = numeric_avg_accum,
- serialtype = bytea,
serialfunc = numeric_avg_serialize
);
@@ -146,7 +130,6 @@ CREATE AGGREGATE myavg (numeric)
(
stype = internal,
sfunc = numeric_avg_accum,
- serialtype = bytea,
serialfunc = numeric_avg_deserialize,
deserialfunc = numeric_avg_deserialize
);
@@ -156,27 +139,15 @@ CREATE AGGREGATE myavg (numeric)
(
stype = internal,
sfunc = numeric_avg_accum,
- serialtype = bytea,
serialfunc = numeric_avg_serialize,
deserialfunc = numeric_avg_serialize
);
--- ensure return type of serialfunc is checked
-CREATE AGGREGATE myavg (numeric)
-(
- stype = internal,
- sfunc = numeric_avg_accum,
- serialtype = text,
- serialfunc = numeric_avg_serialize,
- deserialfunc = numeric_avg_deserialize
-);
-
-- ensure combine function parameters are checked
CREATE AGGREGATE myavg (numeric)
(
stype = internal,
sfunc = numeric_avg_accum,
- serialtype = bytea,
serialfunc = numeric_avg_serialize,
deserialfunc = numeric_avg_deserialize,
combinefunc = int4larger
@@ -188,14 +159,13 @@ CREATE AGGREGATE myavg (numeric)
stype = internal,
sfunc = numeric_avg_accum,
finalfunc = numeric_avg,
- serialtype = bytea,
serialfunc = numeric_avg_serialize,
deserialfunc = numeric_avg_deserialize,
combinefunc = numeric_avg_combine
);
-- Ensure all these functions made it into the catalog
-SELECT aggfnoid,aggtransfn,aggcombinefn,aggtranstype,aggserialfn,aggdeserialfn,aggserialtype
+SELECT aggfnoid,aggtransfn,aggcombinefn,aggtranstype,aggserialfn,aggdeserialfn
FROM pg_aggregate
WHERE aggfnoid = 'myavg'::REGPROC;