Bug #864: MOD(RANDOM(),1.0) don't work in 7.3.1
Bug #864: MOD(RANDOM(),1.0) don't work in 7.3.1
От:
pgsql-bugs@postgresql.org
Дата:
Sverre H. Huseby (shh@thathost.com) reports a bug with a severity of 3
The lower the number the more severe it is.
Short Description
MOD(RANDOM(),1.0) don't work in 7.3.1
Long Description
I just upgraded from 7.2.3 to 7.3.1. Something has changed, as one of my old queries no longer works:
SELECT MOD(RANDOM(),1.0);
ERROR: Function mod(double precision, numeric) does not exist
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts
I was able to work around it by casting RANDOM() to NUMERIC.
Sample Code
No file was uploaded with this reportRe: Bug #864: MOD(RANDOM(),1.0) don't work in 7.3.1
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
pgsql-bugs@postgresql.org writes: > SELECT MOD(RANDOM(),1.0); > ERROR: Function mod(double precision, numeric) does not exist > Unable to identify a function that satisfies the given argument types > You may need to add explicit typecasts > I was able to work around it by casting RANDOM() to NUMERIC. This is not a bug, but an intentional change: float->numeric isn't an implicit cast anymore. regards, tom lane
Re: Bug #864: MOD(RANDOM(),1.0) don't work in 7.3.1
От:
"Sverre H. Huseby" <shh@thathost.com>
Дата:
[Tom Lane] | This is not a bug, but an intentional change: float->numeric isn't | an implicit cast anymore. Ah. I didn't find it in the "Observe the following incompatibilities" of the HISTORY file, so I imagined it could be unintentional. Thanks for replying! Sverre. -- shh@thathost.com Computer Geek? Try my Nerd Quiz http://shh.thathost.com/ http://nerdquiz.thathost.com/