Hi. I'm receiving this error message: invalid UTF-8 byte sequence detected SET search_path TO administracao,public; CREATE OR REPLACE FUNCTION inserirTela(text,text,text) RETURNS text AS ' DECLARE sName ALIAS FOR $1; sDesc ALIAS FOR $2; cSist ALIAS FOR $3; BEGIN SET search_path TO administracao,public; INSERT INTO telas (nome_tela,descricao,sistema) VALUES( sName, sDesc, cSist ); RETURN ''Registro inserido com sucesso''; EXCEPTION WHEN unique_violation THEN RETURN ''Ja existe uma tela com este nome''; WHEN others THEN RETURN ''Erro ao inserir registro''; END; ' LANGUAGE plpgsql; The problem is in the RETURN messages... if it's oculted the error not occur. What i do? My database is UTF-8. Thanks.