Breaking of existing apps with CVS version - Mailing list pgsql-hackers

From Philip Warner
Subject Breaking of existing apps with CVS version
Date
Msg-id 3.0.5.32.20001123150026.022b8ac0@mail.rhyme.com.au
Whole thread Raw
Responses Re: Breaking of existing apps with CVS version
List pgsql-hackers
There is a minor breakage of existing apps that occurs with current CVS.

In 7.0 doing the following:
   create table tsc(f1 int4 , f2 int4);   insert into tsc values(1,4);   select sum(f1)/sum(f2) from tsc;

would actually result in zero, since it worked with integers throughout. As
a result, I adopted the following strategy:
   select cast(sum(f1) as float8)/sum(f2) from tsc;

which produced the expected results.

Now in 7.1 this breaks with:

ERROR:  Unable to identify an operator '/' for types 'float8' and 'numeric'       You will have to retype this query
usingan explicit cast
 

Is there a reason why it doesn't promote float8 to numeric?




----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RE: ALTER TABLE...ADD CONSTRAINT?
Next
From: Tom Lane
Date:
Subject: Re: Breaking of existing apps with CVS version