Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZcSs-0006Ul-14 for pgsql-general@arkaria.postgresql.org; Wed, 19 Dec 2018 14:04:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gZcSq-0001mb-PF for pgsql-general@arkaria.postgresql.org; Wed, 19 Dec 2018 14:04:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZcSq-0001mU-By for pgsql-general@lists.postgresql.org; Wed, 19 Dec 2018 14:04:44 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gZcSn-0004Wz-Qv for pgsql-general@lists.postgresql.org; Wed, 19 Dec 2018 14:04:42 +0000 Received: by mail-oi1-x235.google.com with SMTP id c206so1680261oib.0 for ; Wed, 19 Dec 2018 06:04:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=zVBD9D6+uO+hPYwcyPIoaoR9NvGuvg+0F3LnAtbgniY=; b=Qn3aHyVTCRdc5HIdfS8s508TeHj+Nnuj9QhyEpFqRbCRvNeHXB4JWv3OE7vGs+5iPC M7qWXcNvehmSgiJnP4ReauDk7+jQYLBhK9sx9S1s9rxlZG88l0XD4BcrgZ+HcEzSNH1i tJGebY9wrYuyeYDmG9iI7cv0AjoC7JRYpLajigwlo6Ki/0t5h18i1YW9pOi6ZTPwT4VX G/+kMisRXwVltRhiAjdZoOlIkGPlobp49Lgjw45+hx26OqrGVO3wxPTcWeMt6bguCWmt HfcxDRdbJucTrx9e/RdqUDR7Bi1gpa4l7hn5hMFGvyhED3M94QuuzH4KaNuRXrLAfDQM pTXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=zVBD9D6+uO+hPYwcyPIoaoR9NvGuvg+0F3LnAtbgniY=; b=f8ucRu0mqoMvw/n9Qs8frIHwJniJJu9VyuXkRYkg+bOoOGBaiT1Z31nw2ZkxbOtXam 1+pX4rbPPnIVHhkAhRitjomShkkIgOGLAsb6wC4dPuY9oPaCUwfLSefjKA4CuPzMWwRK YcLAPACY33OgmOHkaEmy5ZxSueaLzqXMHxP/eb761OvyG8VJR+Za7TWgxF59J34FfOTX mptxvomh2cZ9vjKnQZLzJY5gf3Sl9E8FmBIk5CNa9G78HTVL+EWiDYliT9szar7y26zd AayEzZ42Ij+qZbGk5teUBLnXDTixtZ8pdMgBZubRYYCB8UsocOMoMNpp0NveoM+zP9Dj psyA== X-Gm-Message-State: AA+aEWY0dM9spcnPsOlgnJ9K43hUcBbUd0YIKEeSENcSl0J+61hik9vJ dyOplcWQaGdVhvzB63Gh76HZ21Of X-Google-Smtp-Source: AFSGD/WZ9zzkKegKjMopcXc/b/03sQS4zopHqIGwvyTBF7XaAlDZ/DEMxsS3o/tqQRx96BHI4nK7qg== X-Received: by 2002:aca:da02:: with SMTP id r2mr1129206oig.66.1545228280895; Wed, 19 Dec 2018 06:04:40 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id a201sm10514803oii.27.2018.12.19.06.04.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Dec 2018 06:04:40 -0800 (PST) Subject: Re: Format an Update with calculation To: pgsql-general@lists.postgresql.org References: <1545117297.4397.18.camel@dell990-bret-centos.localdomain> <9c8f99cc-241e-531a-0474-7956d6f718b8@aklaver.com> <85cdf83ed6473eb48dc1a66c44f55c61@stz-bg.com> From: Ron Message-ID: <87215601-3060-7966-2b85-53f2de2eb87f@gmail.com> Date: Wed, 19 Dec 2018 08:04:39 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <85cdf83ed6473eb48dc1a66c44f55c61@stz-bg.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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.