pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: Format an Update with calculation
Date: Wed, 19 Dec 2018 08:04:39 -0600
Message-ID: <87215601-3060-7966-2b85-53f2de2eb87f@gmail.com> (raw)
In-Reply-To: <85cdf83ed6473eb48dc1a66c44f55c61@stz-bg.com>
References: <1545117297.4397.18.camel@dell990-bret-centos.localdomain>
	<9c8f99cc-241e-531a-0474-7956d6f718b8@aklaver.com>
	<85cdf83ed6473eb48dc1a66c44f55c61@stz-bg.com>

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.




view thread (9+ messages)  latest in thread

Message-ID: <87215601-3060-7966-2b85-53f2de2eb87f@gmail.com>
Permalink:  ../87215601-3060-7966-2b85-53f2de2eb87f@gmail.com/
Also on:    postgresql.org/message-id/87215601-3060-7966-2b85-53f2de2eb87f@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: Format an Update with calculation
  In-Reply-To: <87215601-3060-7966-2b85-53f2de2eb87f@gmail.com>
  References: <1545117297.4397.18.camel@dell990-bret-centos.localdomain> <9c8f99cc-241e-531a-0474-7956d6f718b8@aklaver.com> <85cdf83ed6473eb48dc1a66c44f55c61@stz-bg.com> <87215601-3060-7966-2b85-53f2de2eb87f@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox