Обсуждение: money with 4 digits after dot

Поиск
Список
Период
Сортировка

money with 4 digits after dot

От
Konstantin Izmailov
Дата:
I'm trying to insert data into Postgres using COPY command. The data originates from AdventureWorksDW. However, it fails with: "ERROR:  invalid input syntax for type money: "2171.2942"  "
 
Is it possible to import money into Postgres with 4 digits after the dot?

Re: money with 4 digits after dot

От
Tom Lane
Дата:
Konstantin Izmailov <pgfizm@gmail.com> writes:
> Is it possible to import money into Postgres with 4 digits after the dot?

You would need to set lc_monetary to a locale that permits that.
        regards, tom lane



Re: money with 4 digits after dot

От
Konstantin Izmailov
Дата:
I found a workaround: domain type defined as: CREATE DOMAIN currency AS numeric(16,4);
Thank you!