Re: How useful is the money datatype?

Поиск
Список
Период
Сортировка
Искать
От
Guy Rouillier
Тема
Re: How useful is the money datatype?
Дата
Msg-id
4ACA4D9C.8030401@burntmail.com
Ответ на
Список
Дерево обсуждения
How useful is the money datatype? Thom Brown <thombrown@gmail.com>
Re: How useful is the money datatype? Peter Eisentraut <peter_e@gmx.net>
Re: How useful is the money datatype? Raymond O'Donnell <rod@iol.ie>
Re: How useful is the money datatype? Thom Brown <thombrown@gmail.com>
Re: How useful is the money datatype? Filip Rembiałkowski <plk.zuber@gmail.com>
Re: How useful is the money datatype? Peter Geoghegan <peter.geoghegan86@gmail.com>
Re: How useful is the money datatype? Grzegorz Jaśkiewicz <gryzman@gmail.com>
Re: How useful is the money datatype? Greg Stark <gsstark@mit.edu>
Re: How useful is the money datatype? Raymond O'Donnell <rod@iol.ie>
Re: How useful is the money datatype? Sam Mason <sam@samason.me.uk>
Re: How useful is the money datatype? Merlin Moncure <mmoncure@gmail.com>
Re: How useful is the money datatype? Sam Mason <sam@samason.me.uk>
Re: How useful is the money datatype? "V S P" <pgsql-general@postgresql.org>
Re: How useful is the money datatype? Sam Mason <sam@samason.me.uk>
Re: How useful is the money datatype? Craig Ringer <craig@postnewspapers.com.au>
Re: How useful is the money datatype? Rich Shepard <rshepard@appl-ecosys.com>
Re: How useful is the money datatype? Sam Mason <sam@samason.me.uk>
Re: How useful is the money datatype? justin <justin@emproshunts.com>
Re: How useful is the money datatype? Guy Rouillier <guyr-ml1@burntmail.com>
Re: How useful is the money datatype? Christophe Pettus <xof@thebuild.com>
Re: How useful is the money datatype? Guy Rouillier <guyr-ml1@burntmail.com>
Re: How useful is the money datatype? Bruce Momjian <bruce@momjian.us>
Re: How useful is the money datatype? Guy Rouillier <guyr-ml1@burntmail.com>
Re: How useful is the money datatype? John R Pierce <pierce@hogranch.com>
Re: How useful is the money datatype? Christophe Pettus <xof@thebuild.com>
Re: How useful is the money datatype? Sam Mason <sam@samason.me.uk>
Re: How useful is the money datatype? Peter Geoghegan <peter.geoghegan86@gmail.com>
Re: How useful is the money datatype? Thom Brown <thombrown@gmail.com>
Christophe Pettus wrote:
> 
> On Oct 4, 2009, at 7:09 PM, Guy Rouillier wrote:
>> There is no reason why PG could not support packed decimal.
> 
> Is that not NUMERIC?

No, that is not NUMERIC.  All numeric types are stored as binary 
representations.  Packed decimal is not.  Perhaps an example would 
clarify.  The number 1234 would be represented as follows:

binary: 10011010010
packed decimal: 12 34

Packed decimal needs to be able to represent 10 distinct characters, 
0-9, so it uses half a byte for each.  So a 4 digit number can be 
represented in 2 bytes (for simplicity, I'm ignoring sign.  That takes a 
half byte.)

The IBM implementation provides a corresponding arithmetic library to 
use packed decimal.  These numbers are never converted to binary, so 
there is no loss in precision.

-- 
Guy Rouillier
В списке pgsql-general по дате отправления
От: Gerhard Wiesinger
Дата:
От: Bruce Momjian
Дата:
FAQ