BUG #1112: round(float-type does not work)

Поиск
Список
Период
Сортировка
От PostgreSQL Bugs List
Тема BUG #1112: round(float-type does not work)
Дата
Msg-id 20040324095237.726F6CF510D@www.postgresql.com
обсуждение исходный текст
Ответы Re: BUG #1112: round(float-type does not work)  (CoL <col@mportal.hu>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      1112
Logged by:          Ulf Mehlig

Email address:      ulf.mehlig@zmt-bremen.de

PostgreSQL version: 7.4

Operating system:   Debian Linux/i386 "testing"

Description:        round(float-type does not work)

Details:

After upgrading to 7.4.2 I just discovered that the round(f,d) function does
not work as expected (bug or feature?):

 xxx=> select round(pi(), 2);
 ERROR:  function round(double precision, integer) does  not exist
 HINT:  No function matches the given name and argument  types. You may need
to add explicit type casts.

Typecasting to "NUMERIC" helps, but in my opinion it should not be necessary
to typecast float values for rounding:

xxx=> select round(pi()::numeric, 2);
 round
-------
  3.14
(1 row)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #1111: documentation error
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1113: Default template databases grant CREATE to PUBLIC