Re: Monetary Data Types Improvement

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Monetary Data Types Improvement
Дата
Msg-id CAApHDvoSUgZT1T7EyZTDBAJu-B=ffyXxKEiW7SwnMWJOMTuo2Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Monetary Data Types Improvement  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: Monetary Data Types Improvement  (Erik Wienhold <ewie@ewie.name>)
Список 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 по дате отправления:

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: Monetary Data Types Improvement
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Non-blocking synchronization in libpq using pipeline mode