Re: POC: rational number type (fractions)

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Chapman Flack <chap(at)anastigmatix(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Joe Nelson <joe(at)begriffs(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: POC: rational number type (fractions)
Date: 2020-07-01 20:09:35
Message-ID: 57d0e68d-2706-60a3-f020-ba4c8fd4b64b@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 5/22/20 1:53 AM, Noah Misch wrote:
> On Thu, May 21, 2020 at 01:40:10PM -0400, Robert Haas wrote:
>> On Mon, May 18, 2020 at 6:15 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> 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.
>> As is often the case, I'm a little more positive about including this
>> than Tom, but as is also often the case, I'm somewhat cautious, too.
>> On the one hand, I think it would be cool to have and people would
>> like it. But, On the other hand, I also think we'd only want it if
>> we're convinced that it's a really good implementation and that
>> there's not a competing design which is better, or even equally good.
> I vote for keeping it out of core, mostly because writing rational numeric
> code is so different from writing DBMS core code. (Many of our existing
> types, like numeric and the geometric types, have the same problem. Let's not
> invite more of that.) The optimal reviewer pools won't have much overlap, so
> patches may sit awhile and/or settle for a cursory review.
>
> More language standard libraries provide "numeric"-style big decimals[1] than
> provide big rationals[2], suggesting we're in good company.
>
> [1] https://en.wikipedia.org/wiki/List_of_arbitrary-precision_arithmetic_software#Languages
> [2] https://en.wikipedia.org/wiki/Rational_data_type#Language_support
>
>

I agree. Also the original rationale that people want to use it on RDS
is pretty awful. We can't just add in every extension that some DBAAS
provider doesn't support.

I think we mark this as rejected.

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-07-01 20:12:20 Re: pg_read_file() with virtual files returns empty string
Previous Message Robert Haas 2020-07-01 20:08:21 Re: v12 and TimeLine switches and backups/restores