BUG #5605: round(attr_name,int) works bad - Mailing list pgsql-bugs

From Adam Radlowski
Subject BUG #5605: round(attr_name,int) works bad
Date
Msg-id 201008060812.o768C8BR085657@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5605: round(attr_name,int) works bad  (Alex Hunsaker <badalex@gmail.com>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5605
Logged by:          Adam Radlowski
Email address:      adamr@informatyka.gdansk.pl
PostgreSQL version: 8.4.4
Operating system:   Gentoo 64 bit (PSQL 8.4.4), Fedora 12 32 bit (PSQL
8.4.1)
Description:        round(attr_name,int) works bad
Details:

On both systems simmilar problems:
PSQL 8.4.4 (taken from "www.postgresql.org" and compiled on 64 bit latest
Gentoo)
PSQL 8.4.1 (from Fedora 12 distribution disk):

If I try for example:
select round(any_numeric_field*something,2) from any_table;
I get information, that the function dos not exist.
If I use round(numeric_field*something,int) in "insert" command, round
returns always only the value of "numeric_field".


Comment:
In some cases I can use for example:
select round(100.0*any_numeric_field)/100.0 from any_table;
..but in programs wchich are generating SQL code and I can't modify them it
is important problem.

pgsql-bugs by date:

Previous
From: Fujii Masao
Date:
Subject: Re: In 8.2, shutdown wrongly caused automatic restart
Next
From: Chris
Date:
Subject: Re: BUG #5602: Recovering from Hot-Standby file backup leads to the currupted indexes