Re: BUG #5605: round(attr_name,int) works bad

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: BUG #5605: round(attr_name,int) works bad
Дата
Msg-id AANLkTi=UtAQQxBzh69DaAtQ14qBtRjmCXGbVacinSeW2@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #5605: round(attr_name,int) works bad  ("Adam Radlowski" <adamr@informatyka.gdansk.pl>)
Ответы Re: BUG #5605: round(attr_name,int) works bad  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, Aug 6, 2010 at 02:12, Adam Radlowski
<adamr@informatyka.gdansk.pl> wrote:
> PostgreSQL version: 8.4.4
> Operating system: =C2=A0 Gentoo 64 bit (PSQL 8.4.4), Fedora 12 32 bit (PS=
QL
> 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.

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #5607: memmory leak in ecpg
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5605: round(attr_name,int) works bad