Revision 13962
Added by Aaron Marcuse-Kubitza over 10 years ago
util.sql | ||
---|---|---|
3865 | 3865 |
CREATE FUNCTION replace_words(replacements hstore, str text) RETURNS text |
3866 | 3866 |
LANGUAGE sql IMMUTABLE |
3867 | 3867 |
AS $_$ |
3868 |
SELECT string_agg(util._map($1||'*=>*', word), '') FROM util.words($2) word
|
|
3868 |
SELECT util.map_words($1||'*=>*', $2)
|
|
3869 | 3869 |
$_$; |
3870 | 3870 |
|
3871 | 3871 |
|
Also available in: Unified diff
schemas/util.sql: replace_words(): use map_words() to enable inlining the concatenated hstore, so that it doesn't need to be concatenated on each function call