Encoding Problem - Mailing list pgsql-general

From Marcos
Subject Encoding Problem
Date
Msg-id 1137172252.4836.21.camel@servidor
Whole thread Raw
List pgsql-general
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.


pgsql-general by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: Error when inserting millions of records
Next
From: John Gray
Date:
Subject: Re: PostgreSQL Top 10 Wishlist