File: gamma

package info (click to toggle)
plr 1%3A8.4.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,128 kB
  • sloc: ansic: 4,742; sql: 628; sh: 357; makefile: 77; perl: 20
file content (26 lines) | stat: -rw-r--r-- 1,264 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- a/expected/plr.out
+++ b/expected/plr.out
@@ -328,8 +328,8 @@ select round(r_gamma('{1.23,1.31,1.42,1.
  0.91075486
 (1 row)
 
-CREATE AGGREGATE gamma (sfunc = plr_array_accum, basetype = float8, stype = _float8, finalfunc = r_gamma);
-select f1, round(gamma(f2)::numeric,8) from foo group by f1 order by f1;
+CREATE AGGREGATE gamma_agg (sfunc = plr_array_accum, basetype = float8, stype = _float8, finalfunc = r_gamma);
+select f1, round(gamma_agg(f2)::numeric,8) from foo group by f1 order by f1;
   f1  |   round    
 ------+------------
  cat1 | 0.91557649
--- a/sql/plr.sql
+++ b/sql/plr.sql
@@ -153,8 +153,8 @@ select f1, median(f2) from foo group by
 
 create or replace function r_gamma(_float8) returns float as 'gamma(arg1)' language 'plr';
 select round(r_gamma('{1.23,1.31,1.42,1.27}'::_float8)::numeric,8);
-CREATE AGGREGATE gamma (sfunc = plr_array_accum, basetype = float8, stype = _float8, finalfunc = r_gamma);
-select f1, round(gamma(f2)::numeric,8) from foo group by f1 order by f1;
+CREATE AGGREGATE gamma_agg (sfunc = plr_array_accum, basetype = float8, stype = _float8, finalfunc = r_gamma);
+select f1, round(gamma_agg(f2)::numeric,8) from foo group by f1 order by f1;
 
 --
 -- test returning vectors, arrays, matricies, and dataframes