Re: [GENERAL] Does NUMERIC lose precision?

2017-05-29 Thread Tom Lane
Kaiting Chen writes: > Hi everyone. I’m trying to perform some exact precision arithmetic with > PostgreSQL’s NUMERIC type. However I can’t seem to get the unparameterized > NUMERIC type to perform exact precision arithmetic: Division is inherently inexact, except in

Re: [GENERAL] Does NUMERIC lose precision?

2017-05-29 Thread Melvin Davidson
On Mon, May 29, 2017 at 4:19 PM, Kaiting Chen wrote: > Hi everyone. I’m trying to perform some exact precision arithmetic with > PostgreSQL’s NUMERIC type. However I can’t seem to get the unparameterized > NUMERIC type to perform exact precision arithmetic: > > # SELECT

[GENERAL] Does NUMERIC lose precision?

2017-05-29 Thread Kaiting Chen
Hi everyone. I’m trying to perform some exact precision arithmetic with PostgreSQL’s NUMERIC type. However I can’t seem to get the unparameterized NUMERIC type to perform exact precision arithmetic: # SELECT 2::NUMERIC ^ 64; ?column?