Re: Monetary Data Types Improvement

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Erik Wienhold <ewie(at)ewie(dot)name>
Cc: b(dot)powell(dot)jr(at)outlook(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Monetary Data Types Improvement
Date: 2024-03-18 22:24:10
Message-ID: CAApHDvoSUgZT1T7EyZTDBAJu-B=ffyXxKEiW7SwnMWJOMTuo2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Tue, 19 Mar 2024 at 07:43, Erik Wienhold <ewie(at)ewie(dot)name> wrote:
> Maybe add a note like:
>
> "Money does not implement all operators that one might expect of a
> numeric type. For example, use (-amount::money::numeric)::money to
> negate amount."
>
> That would also fit nicely with the existing examples on casting to
> numeric and float8. The attached patch does that.

My vote would go to adding a deprecation notice to that section of the
docs. There's some talk [1] about how we discourage the usage of the
money type and that goes on to discuss the possibilities of moving it
into a contrib module.

My hope would be that deprecation notice would steer most people away
from using it and therefore reduce the number of questions about it
due to fewer new use cases of it.

David

[1] https://www.postgresql.org/message-id/ZXgh74Ykj3iWvXKr@paquier.xyz

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Alvaro Herrera 2024-03-19 11:49:23 Re: Non-blocking synchronization in libpq using pipeline mode
Previous Message Erik Wienhold 2024-03-18 18:45:08 Re: Monetary Data Types Improvement