Re: Format an Update with calculation

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Format an Update with calculation
Date: 2018-12-19 14:04:39
Message-ID: 87215601-3060-7966-2b85-53f2de2eb87f@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/19/2018 02:12 AM, Condor wrote:
> On 18-12-2018 15:51, Adrian Klaver wrote:
[snip]
>> In addition to what Pavel posted:
>>
>> select round(43.2335, 2);
>>
>>  round
>> -------
>>  43.23
>
>
> Beware with round and numeric
>
> select round(43.2375, 2);
>  round
> -------
>  43.24
>
>
>  select 43.2375::numeric(17, 2);
>  numeric
> ---------
>    43.24

Beware of what?

--
Angular momentum makes the world go 'round.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oleksandr Shulgin 2018-12-19 14:46:00 Re: Error on insert xml
Previous Message Михаил Яремчук 2018-12-19 11:15:09 Error on insert xml