Created
May 28, 2015 21:09
-
-
Save rafaelbernard/78966a8be9cdff018690 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Function: desacentua(character varying) | |
-- DROP FUNCTION desacentua(character varying); | |
CREATE OR REPLACE FUNCTION desacentua(texto character varying) | |
RETURNS character varying AS | |
$BODY$ | |
SELECT translate( $1,'ÁÉÍÓÚÀÈÌÒÙÃÕÂÊÎÔÛÄËÏÖÜÇÑáéíóúàèìòùãõâêîôûäëïöüçñ','AEIOUAEIOUAOAEIOUAEIOUCNaeiouaeiouaoaeiouaeioucn') | |
$BODY$ | |
LANGUAGE sql IMMUTABLE | |
; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment