| From: | Louis-David Mitterrand <cunctator(at)apartia(dot)ch> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | problem with float8 input format |
| Date: | 2000-08-10 15:26:46 |
| Message-ID: | 20000810172646.A2268@styx |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers |
Hello,
Suddenly I am getting errors with the following function:
SELECT incr(max_price($1),0.05)
000810.17:20:41.181 [2246] ERROR: Bad float8 input format '0.05'
000810.17:20:41.181 [2246] AbortCurrentTransaction
Where incr() is defined as:
CREATE FUNCTION "incr" (float8,float8 ) RETURNS float8 AS '
SELECT CASE WHEN $1 < dpow(10,int8(log($1))+1)/2
THEN (dpow(10,int8(log($1)))) * $2
ELSE (dpow(10,int8(log($1))+1)/2) * $2
END
' LANGUAGE 'SQL';
Strangely engough the function call works fine when called from psql but
fails (but not always!) from a C trigger.
Thanks in advance for any help,
--
Louis-David Mitterrand - ldm(at)apartia(dot)org - http://www.apartia.org
"Kill a man, and you are an assassin. Kill millions of men, and you
are a conqueror. Kill everyone, and you are a god." -- Jean Rostand
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephan Szabo | 2000-08-10 16:38:18 | Re: pg_dump and restore |
| Previous Message | Mikhail Terekhov | 2000-08-10 14:50:48 | NOTIFY from PL/pgSQL trigger procedure |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jan Wieck | 2000-08-10 16:25:18 | Re: Arrays and foreign keys |
| Previous Message | Kaare Rasmussen | 2000-08-10 14:53:23 | Re: Arrays and foreign keys |