money with 4 digits after dot

Started by Konstantin Izmailovalmost 13 years ago3 messages
#1Konstantin Izmailov
pgfizm@gmail.com

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?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Konstantin Izmailov (#1)
Re: money with 4 digits after dot

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

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Konstantin Izmailov
pgfizm@gmail.com
In reply to: Tom Lane (#2)
Re: [HACKERS] money with 4 digits after dot

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