type cast for ERROR: function chr(double precision) does not exist???

Поиск
Список
Период
Сортировка
От Marcel Boscher
Тема type cast for ERROR: function chr(double precision) does not exist???
Дата
Msg-id 4119D0CF.7050208@emedia-office.de
обсуждение исходный текст
Список pgsql-general
Hello everybody,

i get strange error messages when trying to call up my function

with a SELECT functionname(with or without int);

varying from:

ERROR:  function chr(double precision) does not exist
ERROR:  function FUNCTIONNAME() does not exist

the problem maybe :
SELECT chr(trunc((random()*26)+65))
is there anything i need to type cast?

i have tried several

CREATE CAST (* AS *);
in particularly every possible row ;-)

 DECLARE
  anzahl      alias for $1;
  i           int4;
  zeichen     char(1);
  zufallstext text;
  entries     int8;
BEGIN
    LOOP
    zufallstext := '';
    for i in 1..anzahl LOOP
          SELECT chr(trunc((random()*26)+65)) INTO zeichen;
          zufallstext := zufallstext || zeichen;
    END LOOP;
        SELECT count(*) INTO entries FROM se_errorcode
        WHERE entry = zufallstext;
    EXIT WHEN entries = 0;
  END LOOP;
  RETURN zufallstext;
END;

В списке pgsql-general по дате отправления:

Предыдущее
От: "Uwe C. Schroeder"
Дата:
Сообщение: Slony setup help needed
Следующее
От: Andreas Haumer
Дата:
Сообщение: Re: history tables with only one function?