Project

General

Profile

« Previous | Next » 

Revision 7704

schemas/functions.sql: Added _avg()

View differences:

functions.sql
85 85

  
86 86

  
87 87
--
88
-- Name: _avg(double precision, double precision, double precision, double precision, double precision); Type: FUNCTION; Schema: functions; Owner: -
89
--
90

  
91
CREATE FUNCTION _avg("0" double precision DEFAULT NULL::double precision, "1" double precision DEFAULT NULL::double precision, "2" double precision DEFAULT NULL::double precision, "3" double precision DEFAULT NULL::double precision, "4" double precision DEFAULT NULL::double precision) RETURNS double precision
92
    LANGUAGE sql IMMUTABLE
93
    AS $_$
94
SELECT avg(value)
95
FROM
96
(VALUES
97
      ($1)
98
    , ($2)
99
    , ($3)
100
    , ($4)
101
    , ($5)
102
)
103
AS v (value)
104
$_$;
105

  
106

  
107
--
88 108
-- Name: _dms_to_dd(text); Type: FUNCTION; Schema: functions; Owner: -
89 109
--
90 110

  

Also available in: Unified diff