Re: Money Data type

From: "Dana Hudes" <dhudes(at)hudes(dot)org>
To: "Meibell Contreras" <mcontr(at)loquesea(dot)com>, "banghe" <banghe(at)baileylink(dot)net>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Money Data type
Date: 2000-06-14 02:54:51
Message-ID: 00a101bfd5ab$e9111d00$3d5cdcd1@hudes.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

You can't use a floating point representation for money! If the "real" type is implemented internally as a C double or float, its not suitable for money.
This is due to the way floating point numbers are stored in hardware. Money should only be done with integral types. Use fixed point arithmetic, or track the decimal point yourself.

----- Original Message -----
From: Meibell Contreras
To: banghe
Cc: pgsql-admin(at)postgresql(dot)org
Sent: Tuesday, June 13, 2000 10:15 PM
Subject: Re: [ADMIN] Money Data type

excuse me... I have a question...

I found another data types like "numeric" and "decimal".
but the "real" type is the only that could accept 14 and 2 decimals... the othes (numeric or decimal does not)... I would like to know how is the precision using the "real" data type....

thanks
Meibell

----- Original Message -----
From: banghe
To: Meibell Contreras
Cc: pgsql-admin(at)postgresql(dot)org
Sent: Tuesday, June 13, 2000 8:17 PM
Subject: Re: [ADMIN] Money Data type

You may use type real? -- Banghe
Meibell Contreras wrote:
hello; Anyone knows if postgres has a bigger data type than money...when you use this; (not with dollar definition); the money data type is not enough... graciasMeibell

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mario Amado Alves 2000-06-14 11:06:03 Re: copy command and indexes
Previous Message Meibell Contreras 2000-06-14 02:15:05 Re: Money Data type