From: | Marcel Boscher <mboscher(at)emedia-office(dot)de> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | type cast for ERROR: function chr(double precision) does not exist??? |
Date: | 2004-08-11 07:54:55 |
Message-ID: | 4119D0CF.7050208@emedia-office.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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;
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Haumer | 2004-08-11 07:56:42 | Re: history tables with only one function? |
Previous Message | Uwe C. Schroeder | 2004-08-11 07:31:24 | Slony setup help needed |