Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqjPY-0000hE-6A for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Jul 2020 20:32:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jqjPX-0002pt-1H for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Jul 2020 20:32:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqjPW-0002pm-Qa for pgsql-hackers@lists.postgresql.org; Wed, 01 Jul 2020 20:32:50 +0000 Received: from tamriel.snowman.net ([96.255.250.162]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jqjPT-0001XE-L3 for pgsql-hackers@postgresql.org; Wed, 01 Jul 2020 20:32:50 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 960585F7A5; Wed, 1 Jul 2020 16:32:46 -0400 (EDT) Date: Wed, 1 Jul 2020 16:32:46 -0400 From: Stephen Frost To: Andrew Dunstan Cc: Noah Misch , Robert Haas , Tom Lane , Chapman Flack , Peter Eisentraut , Joe Nelson , "pgsql-hackers@postgresql.org" Subject: Re: POC: rational number type (fractions) Message-ID: <20200701203246.GX3125@tamriel.snowman.net> References: <20200208042554.GE42864@begriffs.com> <0e2422da-953b-6b96-1900-f67c7e5e3307@2ndquadrant.com> <5EC3031C.6020105@anastigmatix.net> <20552.1589840076@sss.pgh.pa.us> <20200522055332.GA1296415@rfd.leadboat.com> <57d0e68d-2706-60a3-f020-ba4c8fd4b64b@2ndQuadrant.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5C/VXimrgG1HEvSQ" Content-Disposition: inline In-Reply-To: <57d0e68d-2706-60a3-f020-ba4c8fd4b64b@2ndQuadrant.com> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --5C/VXimrgG1HEvSQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Andrew Dunstan (andrew.dunstan@2ndquadrant.com) wrote: > 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 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 maintena= nce > >>> effort on it. So I'd be happier to see this as an out-of-core extens= ion. > >> 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 nume= ric > > code is so different from writing DBMS core code. (Many of our existing > > types, like numeric and the geometric types, have the same problem. Le= t's not > > invite more of that.) The optimal reviewer pools won't have much overl= ap, 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_arithmeti= c_software#Languages > > [2] https://en.wikipedia.org/wiki/Rational_data_type#Language_support >=20 > 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 disagree with this and instead lean more towards the side that Robert and Jeff were taking in that this would be a useful extension and something we should consider including in core. I disagree with Tom and Noah, specifically because, if we add this capability then I see our potential use-cases as increasing and therefore getting more individuals interested in working with us- to potentially include new contributors and possibly committers. > I think we mark this as rejected. The more we reject new things, the less appealing our community ends up being. I don't mean that to be an argument that we should accept everything, but a new capability that has relatively little impact on the core code and is useful should be something we're leaning towards accepting rather than rejecting out of hand because it's not explicitly called out in the SQL standard or appeals to the masses. I'll further say that this is where we end up potentially loosing newcomers to writing their own code in python or other tools when, if we had such support in core, they'd be able to accomplish what they want more easily with PG. Thanks, Stephen --5C/VXimrgG1HEvSQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIbBAEBCgAGBQJe/PLuAAoJEO1sijiDR2RVlWcP+Je/Aic05n71dutGjlkpoFLB iLiDpjmPZqRPSSkKmxk6PADJi/Vtts0d/cR73UQbt4mk6Z9jYciM9xwHToU27uTB me+cyI4PV0IqkM1musYZWxC9F6a1tJ+5EFkwddhBa3Tn8qjMNwCJLQFbEzryX1Z+ wPVHtt2PZ+1dNXBvWfzk6UoNqQFO4f5PH2cq18SUXApMAupFyGhrp2MrLnyXI39C fd/68Va6yXAsYB90prgSRDtJ4TTrL6n0cWQvjfaHYcq2rM9Jd5yNj0yGvhy8TBLW MizzOUNcTEbNFZjjeWlx2HZy5awegTWTa0iBDmYbsCdkj+IGrXAurBAo/Xpcfc3n C4ggNI2OWoRafYZU1/Dw/2fXXyjgWJeZrcL85rp7p/KzReDhkQXYTcYiT3h9oY9T TdrOGpr11ozviChz4n79tnt0iGukWVdGrl3jPf54Oa96zGiTx1dwKXG/qYjnYcsZ YDIIcI/aEe/E4UZaNBL0Y19qYKIqGJ0Cpb8gaYcFYIMDTV2v8IgcL6hQvH88mdqQ gX4qtpOHpR1V+CXs8Af3mdB51EII3A05TKjI2AtwzjUZMiIAcKCpFzu5MhPND086 Pwb174YLOT11DoPklR6CN+pDzeiovAdfE+TAiYkzyhLhUVaZATEw3NKM3bk7H0wt josuzCEs0ifG3VeYTEE= =L/OF -----END PGP SIGNATURE----- --5C/VXimrgG1HEvSQ--