469,167 Members | 1,150 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,167 developers. It's quick & easy.

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

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;

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #1
0 1551

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Rikkert | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Mortomer39 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.