you are in: codestackercodes [RSS]Função para remover acentos em PostgreSQL

Função para remover acentos em PostgreSQL Delicious Email

Funçãozinha em PostgreSQL para remover acentos. Útil para buscar resultados independente da acentuação.

show/hide lines
   1  CREATE OR REPLACE FUNCTION sem_acentos(character varying)
   2    RETURNS character varying AS
   3  $BODY$
   4  	SELECT TRANSLATE($1, 'áéíóúàèìòùãõâêîôôäëïöüçÁÉÍÓÚÀÈÌÒÙÃÕÂÊÎÔÛÄËÏÖÜÇ', 'aeiouaeiouaoaeiooaeioucAEIOUAEIOUAOAEIOOAEIOUC')
   5  $BODY$
   6    LANGUAGE 'sql' VOLATILE;
created by bragil — 24 July 2008 — get a short url — tags: postgresql embed

Comments



We dont send spam :)

If checked, it's highlights your comment
simple_captcha.jpg
Are you a human? Type the code from the image