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 1rHT6I-002aeQ-BT for pgsql-bugs@arkaria.postgresql.org; Sun, 24 Dec 2023 18:21:22 +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 1rHT6H-00DG0f-0S for pgsql-bugs@arkaria.postgresql.org; Sun, 24 Dec 2023 18:21:21 +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 1rHT6G-00DG0W-OC for pgsql-bugs@lists.postgresql.org; Sun, 24 Dec 2023 18:21:20 +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 1rHT6E-00DhKO-7w for pgsql-bugs@lists.postgresql.org; Sun, 24 Dec 2023 18:21:20 +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 3BOILF1B1673414; Sun, 24 Dec 2023 13:21:15 -0500 From: Tom Lane To: "Jonathan S. Katz" cc: Michael Paquier , David Rowley , 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> <2433182.1702391878@sss.pgh.pa.us> <3453263.1702739958@sss.pgh.pa.us> Comments: In-reply-to "Jonathan S. Katz" message dated "Sun, 24 Dec 2023 12:16:31 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1673412.1703442075.1@sss.pgh.pa.us> Date: Sun, 24 Dec 2023 13:21:15 -0500 Message-ID: <1673413.1703442075@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Jonathan S. Katz" writes: > I'm of the strong opinion that we should get rid of money. I personally > haven't encountered it in the wild -- I'm sure it's there, but it seems > limited -- and most apps that seriously deal with money will either user > either "numeric" or an integer-based type. Yeah, maybe we should just do it. I was pleasantly surprised by how little push-back we got from nuking the 32-bit datetime types a few releases ago; perhaps this one would likewise not have much of a constituency. > I am sensitive to the upgrade piece, as we don't want someone relying on > that behavior to be indefinitely stuck. But perhaps part of the > deprecation plan is to just keep the casts around[1] for a few releases, > without exposing the type, and prevent new creations of the type? I don't really see a way to do that, especially not if we don't want to put a large amount of effort into it. We can certainly make pg_upgrade reject "money" columns, and tell people they need to rewrite those before they upgrade not after. regards, tom lane