Encoding Problem

From: Marcos <mjs_ops(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Encoding Problem
Date: 2006-01-13 17:10:52
Message-ID: 1137172252.4836.21.camel@servidor
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2006-01-13 17:23:42 Temporary tables
Previous Message Doug McNaught 2006-01-13 16:34:55 Re: Moving PostgreSQL data directory on Windows