Re: [HACKERS] money or dollar type

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Andreas Zeugswetter
Дата:
Сообщение: AW: [HACKERS] questionable codes in libpq/backend communication
Следующее
От: "Andy Farrell"
Дата:
Сообщение: Box operation algorithms