Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Improve convert_number function
Russ Garrett0cbdeff722c8
diff --git a/schema/functions.sql b/schema/functions.sqlindex 1e95ed9..5fea140 100644--- a/schema/functions.sql+++ b/schema/functions.sql@@ -73,7 +73,7 @@ DECLAREparts TEXT[];res NUMERIC;BEGIN- parts := regexp_matches(value, '^([0-9][0-9,\.]*)', '');+ parts := regexp_matches(value, '^([0-9]+[\.,]?[0-9]*)', '');res := replace(parts[1], ',', '.')::NUMERIC;RETURN res;END