aboutsummaryrefslogtreecommitdiff
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.sql26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/regress/sql/create_aggregate.sql b/src/test/regress/sql/create_aggregate.sql
new file mode 100644
index 00000000000..79b3b02b8dc
--- /dev/null
+++ b/src/test/regress/sql/create_aggregate.sql
@@ -0,0 +1,26 @@
+--
+-- 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'
+);
+
+VACUUM;
+