glints
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
convert_to_alphanumeric(text)
Parameters
Name
Type
Mode
text
IN
Definition
DECLARE cleaned_text text; BEGIN -- Remove accents and convert to lowercase cleaned_text := unaccent(lower($1)); -- Remove special characters cleaned_text := regexp_replace(cleaned_text, '[^A-Za-z0-9\s]', '', 'g'); -- Remove extra whitespaces cleaned_text := trim(regexp_replace(cleaned_text, '\s+', ' ', 'g')); RETURN cleaned_text; END