Hello,
I am migrating a database from MS SQL Server to Postgres.
I have a column named "discount" of type money in SQL Server. I created
the table in Postgres with the same name and type, since Postgres has a
type named money, and am transferring the data by using PDI (Pentaho
Data Integration) Kettle/Spoon.
Kettle throws an error though: column "discount" is of type money but
expression is of type double precision.
The value in the offending insert is: 0.0
Why does Postgres decide that 0.0 is "double precision" (which is a
weird name in my opinion -- why can't it just be double) and not money?
I have control over the SELECT but not over the INSERT. Is there any
way to set the cast the value on the SELECT side in MS SQL Server to
specify the column type of Postgres-money?
The only solution I found is to set the column in Postgres to DOUBLE
PRECISION instead of MONEY, but I'm not sure if there are negative side
effects to that?
Igal Sapir
Lucee Core Developer
Lucee.org <http://lucee.org/>