Re: Monetary Data Types Improvement - Mailing list pgsql-docs

From David Rowley
Subject Re: Monetary Data Types Improvement
Date
Msg-id CAApHDvoSUgZT1T7EyZTDBAJu-B=ffyXxKEiW7SwnMWJOMTuo2Q@mail.gmail.com
Whole thread Raw
In response to Re: Monetary Data Types Improvement  (Erik Wienhold <ewie@ewie.name>)
Responses Re: Monetary Data Types Improvement
List pgsql-docs
On Tue, 19 Mar 2024 at 07:43, Erik Wienhold <ewie@ewie.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



pgsql-docs by date:

Previous
From: Erik Wienhold
Date:
Subject: Re: Monetary Data Types Improvement
Next
From: Alvaro Herrera
Date:
Subject: Re: Non-blocking synchronization in libpq using pipeline mode