Thread: Money Data type

Money Data type

From
"Meibell Contreras"
Date:
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...
 
gracias
Meibell

Re: Money Data type

From
banghe
Date:
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

Re: Money Data type

From
"Meibell Contreras"
Date:
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
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

Re: Money Data type

From
"Dana Hudes"
Date:
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.
Usefixed point arithmetic, or track the decimal point yourself.  

----- Original Message -----
From: Meibell Contreras
To: banghe
Cc: pgsql-admin@postgresql.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
wouldlike to know how is the precision using the "real" data type.... 

thanks
Meibell

----- Original Message -----
From: banghe
To: Meibell Contreras
Cc: pgsql-admin@postgresql.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);
themoney data type is not enough... graciasMeibell 


Re: Money Data type

From
Peter Eisentraut
Date:
On Tue, 13 Jun 2000, Meibell Contreras wrote:

> 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...

`numeric'. And use to_char() for formatting if you like.

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden