On Thu, Dec 3, 2026 at 3:58 PM David Rowley <[email protected]> wrote:
> On Thu, 3 Dec 2026 at 10:07, Corey Huinker <[email protected]> > wrote: > > 2. customers with at least 1 money column: 2.68% > > > I had hoped that this research would show that usage was vanishingly > small, giving us a reason to pursue a more aggressive deprecation schedule, > but that doesn't appear to be the case. > > Yeah. I'm surprised. Could you get some stats on indexes using money_ops?: > e.g: > > SELECT count(*) FROM pg_index WHERE (SELECT oid FROM pg_opclass WHERE > opcname = 'money_ops') = ANY (indclass::oid[]); > My understanding was that the data comes from logs and not direct access to customer machines. I've been keen to not pry too much into how the data sausage is made to protect my ability to make future requests. My experience with other cloud vendors is that direct fleet inspections are possible, but there's a lot of hoops to jump through and the juice is rarely worth the bureaucratic squeeze. In theory, if we were to ever move money to contrib, then providing > another type based on int64 / 100 and adding a WITHOUT FUNCTION cast > would allow switching to the new type without table rewrites. > Moving it to contrib further helps shun the type, but doesn't actually lower our maintenance overhead, though it does de-prioritize that maintenance somewhat. This may sound fanciful, but would it make sense to change the primary name of the money type to "cents" or "iso_4217_2_decimal" [1] or some other name that clarifies the limited utility of the datatype? An unattractive name could help customers to deprecate the type for us. [1] https://en.wikipedia.org/wiki/ISO_4217 > I once wrote a type called fixeddecimal [1] which does that, same as > money. The following seems to work without a table rewrite. > > ... > > But it's slow if you create an index on m(a) as the index needs rebuilt. > The indexes do appear to be the main barrier. I'll reach out to my contact to see if we can triangulate money index usage in some way.
