Revision 12361
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
3086 | 3086 |
CREATE FUNCTION truncated_prefixed_name_regexp(name text, max_prefix_len integer) RETURNS text |
3087 | 3087 |
LANGUAGE sql IMMUTABLE |
3088 | 3088 |
AS $_$ |
3089 |
SELECT '^(.*)'||util._if(util.name_was_truncated($1), |
|
3089 |
SELECT '^(.*)'||util._if(util.name_was_truncated($1, $2),
|
|
3090 | 3090 |
util.regexp_quote(util.rtrim_n($1, $2)), util.regexp_quote($1)||'$') |
3091 | 3091 |
$_$; |
3092 | 3092 |
|
Also available in: Unified diff
bugfix: schemas/util.sql: truncated_prefixed_name_regexp(): need to pass max_prefix_len to util.name_was_truncated() because although the name itself might not have been truncated, it might become truncated once prefixed