pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedMoney Data type
5+ messages / 4 participants
[nested] [flat]
* Money Data type
@ 2000-06-13 20:16 Meibell Contreras <mcontr@loquesea.com>
0 siblings, 2 replies; 5+ messages in thread
From: Meibell Contreras @ 2000-06-13 20:16 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Money Data type
@ 2000-06-14 00:17 banghe <banghe@baileylink.net>
parent: Meibell Contreras <mcontr@loquesea.com>
1 sibling, 1 reply; 5+ messages in thread
From: banghe @ 2000-06-14 00:17 UTC (permalink / raw)
To: Meibell Contreras <mcontr@loquesea.com>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Money Data type
@ 2000-06-14 02:15 Meibell Contreras <mcontr@loquesea.com>
parent: banghe <banghe@baileylink.net>
0 siblings, 1 reply; 5+ messages in thread
From: Meibell Contreras @ 2000-06-14 02:15 UTC (permalink / raw)
To: banghe <banghe@baileylink.net>; +Cc: pgsql-admin
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@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); the money data type is not enough... graciasMeibell
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Money Data type
@ 2000-06-14 02:54 Dana Hudes <dhudes@hudes.org>
parent: Meibell Contreras <mcontr@loquesea.com>
0 siblings, 0 replies; 5+ messages in thread
From: Dana Hudes @ 2000-06-14 02:54 UTC (permalink / raw)
To: Meibell Contreras <mcontr@loquesea.com>; banghe <banghe@baileylink.net>; +Cc: 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@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 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@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); the money data type is not enough... graciasMeibell
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Money Data type
@ 2000-06-14 11:19 Peter Eisentraut <e99re41@DoCS.UU.SE>
parent: Meibell Contreras <mcontr@loquesea.com>
1 sibling, 0 replies; 5+ messages in thread
From: Peter Eisentraut @ 2000-06-14 11:19 UTC (permalink / raw)
To: Meibell Contreras <mcontr@loquesea.com>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2000-06-14 11:19 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-06-13 20:16 Money Data type Meibell Contreras <mcontr@loquesea.com>
2000-06-14 00:17 ` banghe <banghe@baileylink.net>
2000-06-14 02:15 ` Meibell Contreras <mcontr@loquesea.com>
2000-06-14 02:54 ` Dana Hudes <dhudes@hudes.org>
2000-06-14 11:19 ` Peter Eisentraut <e99re41@DoCS.UU.SE>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox