Re: POC: rational number type (fractions) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: POC: rational number type (fractions)
Date
Msg-id 20552.1589840076@sss.pgh.pa.us
Whole thread Raw
In response to Re: POC: rational number type (fractions)  (Chapman Flack <chap@anastigmatix.net>)
Responses Re: POC: rational number type (fractions)
List pgsql-hackers
Chapman Flack <chap@anastigmatix.net> writes:
> On 05/18/20 17:33, Peter Eisentraut wrote:
>> The numeric type already stores rational numbers.  How is this different? 
>> What's the use?

> Won't ever quite represent, say, 1/3, no matter how big you let it get.

There surely are use-cases for true rational arithmetic, but I'm
dubious that it belongs in core Postgres.  I don't think that enough
of our users would want it to justify expending core-project maintenance
effort on it.  So I'd be happier to see this as an out-of-core extension.

(That'd also ease dealing with the prospect of having more than one
variant, as was mentioned upthread.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: POC: rational number type (fractions)
Next
From: Alvaro Herrera
Date:
Subject: Re: Missing grammar production for WITH TIES