Обсуждение: Bug #835: round(double precision,integer) function in 7.3 does not work

Поиск
Список
Период
Сортировка

Bug #835: round(double precision,integer) function in 7.3 does not work

От
pgsql-bugs@postgresql.org
Дата:
Eugene von Niederhausern (evonnied@niederworks.com) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
round(double precision,integer)  function in 7.3 does not work

Long Description
round(double precision,integer) does not work with 7.3. This function did work with 7.2.x.

Sample Code
select round((extract(epoch from CURRENT_TIMESTAMP) - extract(epoch from '2002-12-01'::timestamp))/60.0/60.0/24.0,2);
/**does not work with 7.3 **/ 

select round((extract(epoch from CURRENT_TIMESTAMP) - extract(epoch from '2002-12-01'::timestamp))/60.0/60.0/24.0); /**
doeswork with 7.3 **/ 

select round(((extract(epoch from CURRENT_TIMESTAMP) - extract(epoch from
'2002-12-01'::timestamp))/60.0/60.0/24.0)::numeric,2);/** does work with 7.3 **/ 

No file was uploaded with this report

Re: Bug #835: round(double precision,integer) function in 7.3 does not work

От
Tom Lane
Дата:
> round(double precision,integer)  function in 7.3 does not work

There isn't a round(double, integer) function in 7.3, and there wasn't
one in 7.2 either.

7.3 forces you to write the cast to numeric explicitly.

            regards, tom lane

Re: List of Bugs

От
ILIR GASHI
Дата:
Hi,

Thanks for the quick response. I was looking through
the archives of pgsql-bugs and I saw that the number
of bugs reported is 830 something. Does that mean that
these bugs are all for the latest version or for all
the versions. If it is for all versions than in some
cases it wasn't specified as to for which version was
the bug found for, so do I just assume it is for the
latest one or contact you to find out.
One last question. Since my project has a time limit
for completion I need to to reproduce only about 100
bugs during my tests. Do you think there are that many
known bugs so far for the latest version. This would
help me to know, since I need to know which version of
postgres to install and add to the existing test
harness which alredy has Interbase 6, MsSQL and
Oracle.

Thanks in advance,

Ilir

--- Tom Lane <tgl@sss.pgh.pa.us> wrote:
> ILIR GASHI <shmeki_ig@yahoo.com> writes:
> > My question is do you maintain a list of known
> bugs
> > with the detailed descriptions of the causes of
> the
> > bug.
>
> We do not.  You could grovel through the archives of
> pgsql-bugs
> though...
>
>             regards, tom lane



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com