Re: [GENERAL] Migrating money column from MS SQL Server to Postgres - Mailing list pgsql-general

From David G. Johnston
Subject Re: [GENERAL] Migrating money column from MS SQL Server to Postgres
Date
Msg-id CAKFQuwYvg1JNLHLvDw3O3GH=5tm5OozLFT1kDQ2718c1u=RgMA@mail.gmail.com
Whole thread Raw
In response to [GENERAL] Migrating money column from MS SQL Server to Postgres  ("Igal @ Lucee.org" <igal@lucee.org>)
List pgsql-general
On Wednesday, November 8, 2017, Igal @ Lucee.org <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" (which is a weird name in my opinion -- why can't it just be double) and not money?

The lack of quotes surrounding the value is significant.  Money input requires a string literal.  Only (more or less) integer and double literal values can be written without the single quotes.

David J.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Migrating money column from MS SQL Server to Postgres
Next
From: Allan Kamau
Date:
Subject: Re: [GENERAL] Migrating money column from MS SQL Server to Postgres