Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-09 Thread Igal @ Lucee.org
On 11/9/2017 8:19 AM, Merlin Moncure wrote: On Thu, Nov 9, 2017 at 8:22 AM, Adam Brusselback wrote: Since you are migrating data into a staging table in PostgreSQL, you may set the field data type as TEXT for each field where you have noticed or anticipate issues.

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-09 Thread Merlin Moncure
On Thu, Nov 9, 2017 at 8:22 AM, Adam Brusselback wrote: >> Since you are migrating data into a staging table in PostgreSQL, you may set >> the field data type as TEXT for each field where you have noticed or >> anticipate issues. >> Then after population perform the

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-09 Thread Adam Brusselback
> Since you are migrating data into a staging table in PostgreSQL, you may set > the field data type as TEXT for each field where you have noticed or > anticipate issues. > Then after population perform the datatype transformation query on the given > fields to determine the actual field value

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-09 Thread Allan Kamau
On Thu, Nov 9, 2017 at 9:58 AM, Igal @ Lucee.org wrote: > On 11/8/2017 6:25 PM, Igal @ Lucee.org wrote: > >> On 11/8/2017 5:27 PM, Allan Kamau wrote: >> >>> Maybe using NUMERIC without explicitly stating the precision is >>> recommended. This would allow for values with many

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-08 Thread Igal @ Lucee.org
On 11/8/2017 6:25 PM, Igal @ Lucee.org wrote: On 11/8/2017 5:27 PM, Allan Kamau wrote: Maybe using NUMERIC without explicitly stating the precision is recommended. This would allow for values with many decimal places to be accepted without truncation. Your field may need to capture very small

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-08 Thread Igal @ Lucee.org
On 11/8/2017 5:27 PM, Allan Kamau wrote: Maybe using NUMERIC without explicitly stating the precision is recommended. This would allow for values with many decimal places to be accepted without truncation. Your field may need to capture very small values such as those in bitcoin trading or

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-08 Thread Allan Kamau
On Nov 9, 2017 04:12, "Igal @ Lucee.org" wrote: Thank you all for your help: On 11/8/2017 4:45 PM, Tom Lane wrote: "Igal @ Lucee.org" writes: The value in the offending insert is: 0.0 Why does Postgres decide that 0.0 is "double precision"

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-08 Thread Igal @ Lucee.org
Thank you all for your help: On 11/8/2017 4:45 PM, Tom Lane wrote: "Igal @ Lucee.org" writes: 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?

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-08 Thread Allan Kamau
On Nov 9, 2017 03:46, "Tom Lane" wrote: "Igal @ Lucee.org" writes: > 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

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-08 Thread David G. Johnston
On Wednesday, November 8, 2017, Igal @ Lucee.org wrote: > > 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"

Re: [GENERAL] Migrating money column from MS SQL Server to Postgres

2017-11-08 Thread Tom Lane
"Igal @ Lucee.org" writes: > 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)