From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | Adam Radlowski <adamr(at)informatyka(dot)gdansk(dot)pl> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #5605: round(attr_name,int) works bad |
Date: | 2010-08-06 17:22:19 |
Message-ID: | AANLkTi=UtAQQxBzh69DaAtQ14qBtRjmCXGbVacinSeW2@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Aug 6, 2010 at 02:12, Adam Radlowski
<adamr(at)informatyka(dot)gdansk(dot)pl> wrote:
> PostgreSQL version: 8.4.4
> Operating system: Gentoo 64 bit (PSQL 8.4.4), Fedora 12 32 bit (PSQL
> 8.4.1)
> select round(any_numeric_field*something,2) from any_table;
> I get information, that the function dos not exist.
Can we get the exact *input* and the error? I cant replicate it here:
select round(100::numeric*100, 2);
> If I use round(numeric_field*something,int) in "insert" command, round
> returns always only the value of "numeric_field".
So... insert into table (field) values (round(100*2, 1)) inserts 100?
I find that quite hard to believe. Again some actually sql might help
here as I might just be misunderstanding.
> 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.
Sounds like a problem with whatever is generating the SQL not a
problem with postgres.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Meskes | 2010-08-06 17:22:38 | Re: BUG #5607: memmory leak in ecpg |
Previous Message | Kevin Grittner | 2010-08-06 15:37:34 | Re: BUG #5607: memmory leak in ecpg |