Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rD3tf-000meJ-PX for pgsql-bugs@arkaria.postgresql.org; Tue, 12 Dec 2023 14:38:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rD3td-005Vtr-TK for pgsql-bugs@arkaria.postgresql.org; Tue, 12 Dec 2023 14:38:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rD3td-005VsX-Ko for pgsql-bugs@lists.postgresql.org; Tue, 12 Dec 2023 14:38:05 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rD3ta-00BaJ3-Us for pgsql-bugs@lists.postgresql.org; Tue, 12 Dec 2023 14:38:05 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3BCEbwTY2433183; Tue, 12 Dec 2023 09:37:58 -0500 From: Tom Lane To: David Rowley cc: Michael Paquier , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends In-reply-to: References: <18240-c5da758d7dc1ecf0@postgresql.org> <2171714.1702307153@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Wed, 13 Dec 2023 01:01:38 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2433181.1702391878.1@sss.pgh.pa.us> Date: Tue, 12 Dec 2023 09:37:58 -0500 Message-ID: <2433182.1702391878@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > On Tue, 12 Dec 2023 at 22:03, Michael Paquier wrote: >> And numeric has much better code coverage and support. I am wondering >> whether we've reached the point where it would be better to remove it >> entirely from the tree, and just tell people to use numeric. > We could extract it into a contrib module. Perhaps, but ... > That might help reduce new usages of it and would also allow people > who have large tables using the money type but can't realistically > wait out a table rewrite to upgrade to a newer version of Postgres. ... I doubt that a contrib module would solve the problem for people who can't afford a rewrite. pg_upgrade requires that datatype OIDs stay the same, which is something I don't believe a contrib module could manage. We've run into that before if memory serves. Is it time to do something about that? Perhaps we could allow extension modules to use binary_upgrade_set_next_pg_type_oid, and then somehow reserve the money and _money OIDs forever? regards, tom lane