pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dana Hudes <dhudes@hudes.org>
To: Meibell Contreras <mcontr@loquesea.com>
To: banghe <banghe@baileylink.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Money Data type
Date: Tue, 13 Jun 2000 22:54:51 -0400
Message-ID: <00a101bfd5ab$e9111d00$3d5cdcd1@hudes.org> (raw)
References: <009501bfd574$469166c0$0200000a@zonageek.com>
	<3946CF2B.E0F3DC68@baileylink.net>
	<001001bfd5a6$5ca926a0$0200000a@zonageek.com>

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




view thread (5+ messages)  latest in thread

Message-ID: <00a101bfd5ab$e9111d00$3d5cdcd1@hudes.org>
Permalink:  ../00a101bfd5ab$e9111d00$3d5cdcd1@hudes.org/
Also on:    postgresql.org/message-id/00a101bfd5ab$e9111d00$3d5cdcd1@hudes.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: dhudes@hudes.org, mcontr@loquesea.com, banghe@baileylink.net
  Subject: Re: Money Data type
  In-Reply-To: <00a101bfd5ab$e9111d00$3d5cdcd1@hudes.org>
  References: <009501bfd574$469166c0$0200000a@zonageek.com> <3946CF2B.E0F3DC68@baileylink.net> <001001bfd5a6$5ca926a0$0200000a@zonageek.com> <00a101bfd5ab$e9111d00$3d5cdcd1@hudes.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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