Skip to content
This repository was archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
Add a check to return early if local_name = name
Browse files Browse the repository at this point in the history
  • Loading branch information
giggls committed May 19, 2017
1 parent d27d7ea commit 4eba19f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plpgsql/get_localized_name.sql
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ CREATE or REPLACE FUNCTION osml10n_gen_combined_name(local_name text, name text,
-- raise notice 'regex: %',regex;
IF regexp_matches(concat(' ',unacc,' '),regex) IS NOT NULL THEN
/* try to create a better string for name */
/* do complex checks only in case name != local_name*/
if (char_length(unacc_local) = char_length(unacc)) THEN
return name;
END IF;
IF tags IS NULL THEN
nobrackets=true;
ELSE
Expand Down

0 comments on commit 4eba19f

Please sign in to comment.