Re: POC: rational number type (fractions)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Joe Nelson <joe(at)begriffs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: POC: rational number type (fractions)
Date: 2020-05-18 22:14:36
Message-ID: 20552.1589840076@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chapman Flack <chap(at)anastigmatix(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-05-18 23:30:32 Re: Missing grammar production for WITH TIES
Previous Message Chapman Flack 2020-05-18 21:50:20 Re: POC: rational number type (fractions)