Breaking of existing apps with CVS version

Поиск
Список
Период
Сортировка
От Philip Warner
Тема Breaking of existing apps with CVS version
Дата
Msg-id 3.0.5.32.20001123150026.022b8ac0@mail.rhyme.com.au
обсуждение исходный текст
Ответы Re: Breaking of existing apps with CVS version  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: RE: ALTER TABLE...ADD CONSTRAINT?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Breaking of existing apps with CVS version