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 1janem-0004s3-G0 for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2020 21:50:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1janek-0002vc-0v for pgsql-hackers@arkaria.postgresql.org; Mon, 18 May 2020 21:50:42 +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 1janej-0002vU-FU for pgsql-hackers@lists.postgresql.org; Mon, 18 May 2020 21:50:41 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1janeZ-00044I-Dt for pgsql-hackers@postgresql.org; Mon, 18 May 2020 21:50:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JJZNOVcR87OlGDHaJn1VNi9QLkAjafYO/Gc3Bq0s3LY=; b=ThNQMbTaHxzLeNgLBhn9oBIbMT 0IZacG8pVUmlXV/3e3bOnY1+h/DXeGxOuN/gXNb2fIhkJo8SlRh5uV5F9bD+PDwPF5EIhkOWu0HZE sOseZclrrCGxfNrdnEYbge1zQhXy1mcUOZwcWWHtNkIfhHdL7dmKZfZpYAmFnm7oDpBz+iQWUUmf6 194qC2jqA9c1ZAyXire14RErGVnkuQ1Vzu+mziv1HfIcRe/AF1H+MKVFZt9oXD+17USg3w6bVoH+i XubLxsi9a+hyZ5AT08SZ1Jm+BiCYQtiU24gKn0Mz/KGZYkqhmPJcUTuUAXKwVNzpBMzTTD0nnCwbI n///9TQg==; Received: from [184.19.31.139] (port=58848) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1janeV-00GU0G-52; Mon, 18 May 2020 17:50:27 -0400 Subject: Re: POC: rational number type (fractions) To: Peter Eisentraut , Joe Nelson , pgsql-hackers@postgresql.org References: <20200208042554.GE42864@begriffs.com> <0e2422da-953b-6b96-1900-f67c7e5e3307@2ndquadrant.com> From: Chapman Flack Message-ID: <5EC3031C.6020105@anastigmatix.net> Date: Mon, 18 May 2020 17:50:20 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <0e2422da-953b-6b96-1900-f67c7e5e3307@2ndquadrant.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-96.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 05/18/20 17:33, Peter Eisentraut wrote: > The numeric type already stores rational numbers. How is this different? > What's the use? Seems like numeric is a base-10000 representation. Will work ok for a rational whose denominator factors into 2s and 5s. Won't ever quite represent, say, 1/3, no matter how big you let it get. Regards, -Chap