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 1rEQpa-005fXE-9m for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Dec 2023 09:19:34 +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 1rEQpY-00A8wl-Or for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Dec 2023 09:19:32 +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 1rEQpY-00A8wc-Fk for pgsql-bugs@lists.postgresql.org; Sat, 16 Dec 2023 09:19:32 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rEQpW-00CH3S-6D for pgsql-bugs@lists.postgresql.org; Sat, 16 Dec 2023 09:19:31 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8B5C53200A4D; Sat, 16 Dec 2023 04:19:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 16 Dec 2023 04:19:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1702718367; x=1702804767; bh=aLzML11ccN NRf1nokUXjbNrljO1l/6BO8DAFqzBVdqw=; b=Swep/KUqf2KUDS9spvfIPxia4a 2JAhoM2BJOE/scvTghxH2Ph/+9e0aQ64wnPtu1z5nlWZlf1zoGAJLCVSAN1GkVIx 09UAY2ln/qAGhUYI9NuLchemjQODP+u0+EDr3LgZ6mS7Pq05abHhSQfMScI5eqhd XafQYhg40W7DxgOJJMUhxc0sLA43IUAjpbxBdOv3ON3kCY9zAnDAxyPIQePVcNtR Llu5CjuofIf/56Q6RP0CEgK1tdC86Lfgb/wxsZwG5lUGrSGBDrYai+GxrpXpBfH8 iEdWSlU82gWEfAOMn3eDh6Lm8IUr6LHG3npy8RI+VJvPzBHF04uh0hc9jbPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1702718367; x=1702804767; bh=aLzML11ccNNRf1nokUXjbNrljO1l /6BO8DAFqzBVdqw=; b=E0XW81qQGXAyYx57QhMM44XNVZrJIsitpZ3DOihWdlcr j3x7OQGaHHDFbj8seBjATuBeSkIc8a51p3GdVyzDmh5FLm+u9UuyYmiAytX2iX+j ImKQc5fR23uaZ4Z1vTRRuCIUKdCnHN1ohc1aNbH9UDuCuhAiaQaymQB40aN576jG 4ofOT/YTnLGWfmLP2dA3aZ2bbBvGq2sjDLAwC9ti/Q4s3pplGBJ2C/PAn6WbsR1P 9GiS9NCsTIg2jBDbuakFSMpnfdjkP/sveqEPQLulFuSHJ+0dvZo0CBDm5XyyogjA cHTrMGQ+azQBQsCO/KSj7YHj0bo9GqJCAFUUUFfdZg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvddtgedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdljedtmdenucfjughrpeffhf fvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfrrghq uhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvg hrnhepteelieefudffhffhtdetleeggeegfffhkeeuveetiefgudduvedutefggeeivdej necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitg hhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 16 Dec 2023 04:19:25 -0500 (EST) Date: Sat, 16 Dec 2023 10:19:22 +0100 From: Michael Paquier To: Tom Lane Cc: David Rowley , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends Message-ID: References: <18240-c5da758d7dc1ecf0@postgresql.org> <2171714.1702307153@sss.pgh.pa.us> <2433182.1702391878@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PH2QHmmebQAT8PIU" Content-Disposition: inline In-Reply-To: <2433182.1702391878@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --PH2QHmmebQAT8PIU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 12, 2023 at 09:37:58AM -0500, Tom Lane wrote: > ... 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? You mean with an integration in binary dumps? I don't see why it would not work and this facility may prove to be useful for out-of-core extension, assuming that this can be made transparent based on some new .control properties on the upgrade cluster, I guess.. Now, I am not sure that we're making users a favor in keeping around a data type that's kind of obsolete these days, particularly when all of them basically require handling of fractional cents when doing serious calculations. That's a trap in disguise, even if tying data to a locale for the unit sounds appealing for some applications. -- Michael --PH2QHmmebQAT8PIU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmV9a5oACgkQnvQgOdby QH230g/8CVUu2m63FLXvwzJ19gfk9JTR+ebZjp3RPy0et6KVswEOMXx3vAl6xWzM /kTQEAGiwiye0XNINPJTQ2Bls2ttmVm4gCEeJ6YZmnFpURT4LMlgt151ZCKYi0Fn 6Q0ggmldaF9N7eVG5a4puK1MZSCPOKuLEhP+huB8TMki3vCLlB/9sHV7XQQy74pa MmXOPA9d/coFc8yR7TYvtHck50cZQlP9wXetsKH2fL9AoRAzRfrdlMeX0EJJGqlJ 37e7OB698/v3DcPiZUXjjpyzftwGxpL84yaxfmh8YpymDuQWqKo26+l4zn6gYpHN +XkEnswjGGuof4EGWnxVwiPmiNr2MeQRPfa28GYJ67Ha8PnIwqZ8ViN0/euvPULQ jrClfmnQKzHDLnktrqjCfb5BO9Biukb68lWYopQzbh56sT8rkXZeUxeQsziYFxWx 9lQexZ8Z01nnagEB5untVY0QvgXJAhpdp1QlZWIyJp4qq/DbunMZ6tiojdY5JNR2 gHWZxlzE7zucALsrRngaoo4WTN8AGYLmOoFi4WUrzFpTtmrw7Egj3+7tzREpDMJf RxXDHTJRlPtlcnai+lG+prlVktBjIP9VBfK4s71EZk1Wspz5I+3ob4+Z1tqZfsHz K7mqM+RpAm4oKjYl9udaMFBCPVPM8BWjS0zCl2/VNfOvAvK448I= =JdpX -----END PGP SIGNATURE----- --PH2QHmmebQAT8PIU--