Thread: money with 4 digits after dot

money with 4 digits after dot

From
Konstantin Izmailov
Date:
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

From
Tom Lane
Date:
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

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