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

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [GENERAL] Migrating money column from MS SQL Server to Postgres
Дата
Msg-id CAKFQuwYvg1JNLHLvDw3O3GH=5tm5OozLFT1kDQ2718c1u=RgMA@mail.gmail.com
обсуждение исходный текст
Ответ на [GENERAL] Migrating money column from MS SQL Server to Postgres  ("Igal @ Lucee.org" <igal@lucee.org>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Migrating money column from MS SQL Server to Postgres
Следующее
От: Allan Kamau
Дата:
Сообщение: Re: [GENERAL] Migrating money column from MS SQL Server to Postgres