Project

General

Profile

« Previous | Next » 

Revision 2943

schemas/functions.sql: Added plain function _label() and use it in trigger function _label()

View differences:

schemas/functions.sql
62 62
    LANGUAGE plpgsql IMMUTABLE
63 63
    AS $$
64 64
BEGIN
65
    new.result := (SELECT new.label||': '||new.value);
65
    new.result := _label(new.label, new.value);
66 66
    RETURN new;
67 67
END;
68 68
$$;
69 69

  
70 70

  
71 71
--
72
-- Name: _label(text, text); Type: FUNCTION; Schema: functions; Owner: -
73
--
74

  
75
CREATE FUNCTION _label(label text, value text) RETURNS text
76
    LANGUAGE sql IMMUTABLE
77
    AS $_$
78
SELECT $1||': '||$2
79
$_$;
80

  
81

  
82
--
72 83
-- Name: _merge(); Type: FUNCTION; Schema: functions; Owner: -
73 84
--
74 85

  

Also available in: Unified diff