From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | "Igal (at) Lucee(dot)org" <igal(at)lucee(dot)org> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Migrating money column from MS SQL Server to Postgres |
Date: | 2017-11-09 00:45:03 |
Message-ID: | CAKFQuwYvg1JNLHLvDw3O3GH=5tm5OozLFT1kDQ2718c1u=RgMA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wednesday, November 8, 2017, Igal @ Lucee.org <igal(at)lucee(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Allan Kamau | 2017-11-09 00:52:45 | Re: Migrating money column from MS SQL Server to Postgres |
Previous Message | Tom Lane | 2017-11-09 00:45:01 | Re: Migrating money column from MS SQL Server to Postgres |