Re: insert column monetary type ver 2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: insert column monetary type ver 2
Дата
Msg-id 3699523.1637594233@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: insert column monetary type ver 2  (Ron <ronljohnsonjr@gmail.com>)
Ответы Re: insert column monetary type ver 2
Список pgsql-general
Ron <ronljohnsonjr@gmail.com> writes:
> On 11/21/21 9:35 PM, Rob Sargent wrote:
>> Some of us like it as an easy formatter trick for reports

> to_char() can do the same, no?

to_char doesn't have adequate logic for locale-specific monetary formatting.
You can get it to emit a locale-specific currency symbol, but it has no
clue whether that should go before or after the value.  It knows nothing
of other locale-specific details, such as possibly using parens in place
of a minus sign.  Also, the POSIX API allows monetary decimal point and
thousands separators to be different from the numeric ones that to_char
knows about.  (I have no idea which locales use that, but I doubt they'd
have put in that complication without need.)

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Дмитрий Иванов
Дата:
Сообщение: Re: pg_dump insert column GENERATED
Следующее
От: Дмитрий Иванов
Дата:
Сообщение: Re: pg_dump insert column GENERATED