agora inbox for pgsql-sql@postgresql.org
help / color / mirror / Atom feedFrom: Robert Strötgen <robert@stroetgen.de>
To: pgsql-sql@postgresql.org
Subject: Re: German "umlaut insensitive" query
Date: Wed, 01 Sep 2004 17:17:09 +0200
Message-ID: <4135E7F5.4070002@stroetgen.de> (raw)
In-Reply-To: <4135DE5B.2000805@webde-ag.de>
References: <4135D647.4060203@stroetgen.de>
<4135DE5B.2000805@webde-ag.de>
> 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/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
view thread (5+ messages) latest in thread
Message-ID: <4135E7F5.4070002@stroetgen.de>
Permalink: ../4135E7F5.4070002@stroetgen.de/
Also on: postgresql.org/message-id/4135E7F5.4070002@stroetgen.de
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: robert@stroetgen.de
Subject: Re: German "umlaut insensitive" query
In-Reply-To: <4135E7F5.4070002@stroetgen.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox