Encapsulate cleaning function and restructure
This commit is contained in:
8
geocoder/extension/sql/0.0.1/10_aux_functions.sql
Normal file
8
geocoder/extension/sql/0.0.1/10_aux_functions.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Cleaning function
|
||||
CREATE OR REPLACE FUNCTION geocode_clean_name(name text) RETURNS text
|
||||
LANGUAGE plpgsql
|
||||
AS $$
|
||||
BEGIN
|
||||
RETURN regexp_replace(name, '[^a-zA-Z\u00C0-\u00ff]+', '', 'g');
|
||||
END
|
||||
$$;
|
||||
Reference in New Issue
Block a user