pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends
Date: Sat, 16 Dec 2023 10:19:22 +0100
Message-ID: <ZX1rmhppwgaczYQ7@paquier.xyz> (raw)
In-Reply-To: <2433182.1702391878@sss.pgh.pa.us>
References: <18240-c5da758d7dc1ecf0@postgresql.org>
	<ZXbi3xo7QhQIe1YN@paquier.xyz>
	<2171714.1702307153@sss.pgh.pa.us>
	<ZXgh74Ykj3iWvXKr@paquier.xyz>
	<CAApHDvrBLa=gQ0tCg8727RaZXWDg1sDvFJ2+-DVy5SC=NSSKkg@mail.gmail.com>
	<2433182.1702391878@sss.pgh.pa.us>

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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (24+ messages)  latest in thread

Message-ID: <ZX1rmhppwgaczYQ7@paquier.xyz>
Permalink:  ../ZX1rmhppwgaczYQ7@paquier.xyz/
Also on:    postgresql.org/message-id/ZX1rmhppwgaczYQ7@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18240: Undefined behaviour in cash_mul_flt8() and friends
  In-Reply-To: <ZX1rmhppwgaczYQ7@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox