| От | Thomas G. Lockhart |
|---|---|
| Тема | Re: [HACKERS] money or dollar type |
| Дата | |
| Msg-id | 355850DF.BC133F00@alumni.caltech.edu обсуждение исходный текст |
| Ответ на | Re: [HACKERS] money or dollar type ("Jose' Soares Da Silva" <sferac@bo.nettuno.it>) |
| Список | pgsql-hackers |
> Seems there's some problems with type 'money'... I can't multiply or
> divide 'money' types, and can't cast it properly to other data types.
> Is this a bug ?
With the new type conversion code:
tgl=> create table mm (m money);
CREATE
tgl=> insert into mm values ('$1600.00');
INSERT 268105 1
tgl=> select m * 1.1 from mm;
?column?
---------
$1,760.00
(1 row)
But,
tgl=> select cast(m as float8) from mm;
float8
----------
1077124288
(1 row)
So there is some funny interaction on the casting, the same as you found
in v6.3.2 (and presumably forever), which I will look into...
- Tom
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера