Revision 2950
Added by Aaron Marcuse-Kubitza over 12 years ago
schemas/functions.sql | ||
---|---|---|
73 | 73 |
-- |
74 | 74 |
|
75 | 75 |
CREATE FUNCTION _label(label text, value text) RETURNS text |
76 |
LANGUAGE sql IMMUTABLE |
|
77 |
AS $_$ |
|
78 |
SELECT $1||': '||$2 |
|
79 |
$_$; |
|
76 |
LANGUAGE plpgsql IMMUTABLE |
|
77 |
AS $$ |
|
78 |
DECLARE |
|
79 |
label text NOT NULL := label; -- add NOT NULL |
|
80 |
BEGIN |
|
81 |
RETURN label||': '||value; |
|
82 |
END; |
|
83 |
$$; |
|
80 | 84 |
|
81 | 85 |
|
82 | 86 |
-- |
Also available in: Unified diff
schemas/functions.sql: _label(): Ensure that label is NOT NULL so it doesn't NULL out the entire string