Revision 14641
Added by Aaron Marcuse-Kubitza about 10 years ago
trunk/schemas/util.sql | ||
---|---|---|
3280 | 3280 |
|
3281 | 3281 |
|
3282 | 3282 |
-- |
3283 |
-- Name: identifier_replace(text, text, text); Type: FUNCTION; Schema: util; Owner: - |
|
3284 |
-- |
|
3285 |
|
|
3286 |
CREATE FUNCTION identifier_replace(replace text, with_ text, str text) RETURNS text |
|
3287 |
LANGUAGE sql IMMUTABLE |
|
3288 |
AS $$ |
|
3289 |
SELECT regexp_replace(str, '\y'||util.regexp_quote(replace)||'\y', with_, 'g') |
|
3290 |
$$; |
|
3291 |
|
|
3292 |
|
|
3293 |
-- |
|
3283 | 3294 |
-- Name: ifnull(anyelement, anyelement); Type: FUNCTION; Schema: util; Owner: - |
3284 | 3295 |
-- |
3285 | 3296 |
|
Also available in: Unified diff
schemas/util.sql: added identifier_replace()