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: Jonathan S. Katz <jkatz@postgresql.org>
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: Mon, 25 Dec 2023 09:52:53 +0900
Message-ID: <ZYjSZZu1UGUlXWXa@paquier.xyz> (raw)
In-Reply-To: <1673413.1703442075@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>
	<ZX1rmhppwgaczYQ7@paquier.xyz>
	<3453263.1702739958@sss.pgh.pa.us>
	<ecdf4a19-e97d-42c8-be45-fb5a46166160@postgresql.org>
	<1673413.1703442075@sss.pgh.pa.us>

On Sun, Dec 24, 2023 at 01:21:15PM -0500, Tom Lane wrote:
> "Jonathan S. Katz" <jkatz@postgresql.org> 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.

Yeah, that's hard to say.  Perhaps it would a good idea to ask more
widely how much people have been relying on that and how large these
data sets are.  Another thing that we could attempt is doing something
about the the table rewrites on type changes to require an EOL.  Like
more CONCURRENTLY flavors in ALTER TABLE?

>> 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.

At least the infra to be able to achieve that should be here.
--
Michael

Attachments:

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

view thread (24+ messages)  latest in thread

Message-ID: <ZYjSZZu1UGUlXWXa@paquier.xyz>
Permalink:  ../ZYjSZZu1UGUlXWXa@paquier.xyz/
Also on:    postgresql.org/message-id/ZYjSZZu1UGUlXWXa@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, jkatz@postgresql.org, 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: <ZYjSZZu1UGUlXWXa@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