Re: German "umlaut insensitive" query - Mailing list pgsql-sql

From Robert Strötgen
Subject Re: German "umlaut insensitive" query
Date
Msg-id 4135E7F5.4070002@stroetgen.de
Whole thread Raw
In response to Re: German "umlaut insensitive" query  (Michael Kleiser <mkl@webde-ag.de>)
List pgsql-sql
> select replace( replace( replace( replace( 'Test ä ö ü ß', 'ä','ae'), 
> 'ö','oe' ), 'ü','ue'), 'ß','ss' );

Thanks a lot. A wrote this into a user defined function with lower() 
around the source string, and it works. :-)

CREATE OR REPLACE FUNCTION public.unumlaut(varchar)  RETURNS varchar AS
'select replace( replace( replace( replace( lower($1), \'ä\',\'ae\'), 
\'ö\',\'oe\' ), \'ü\',\'ue\'), \'ß\',\'ss\' );'  LANGUAGE 'sql' IMMUTABLE STRICT;

Best regards,
Robert. :)

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  Robert Strötgen  mailto:robert@stroetgen.de
      http://www.stroetgen.de/
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


pgsql-sql by date:

Previous
From: Erik Wasser
Date:
Subject: Extracting fieldnames from a TABLE
Next
From: John DeSoi
Date:
Subject: Re: colored PL with emacs