Re: precision and scale functions for numeric - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: precision and scale functions for numeric
Date
Msg-id 4F9EA46902000025000475D9@gw.wicourts.gov
Whole thread Raw
In response to Re: precision and scale functions for numeric  ("David Johnston" <polobo@yahoo.com>)
List pgsql-hackers
"David Johnston" <polobo@yahoo.com> wrote:
>> I think you could test for integer-ness by testing whether val % 0 =
0.
> Modulus is a division function anything "% 0" results in a
division-by-zero
It seems pretty clear that he meant "% 1".
test=# select '1.01'::numeric % 1;?column? 
----------    0.01
(1 row)
-Kevin


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: precision and scale functions for numeric
Next
From: Bruce Momjian
Date:
Subject: Re: Future In-Core Replication