From: Jan Wieck <JanWieck@Yahoo.com>
To: Scott Muir <wsmuir@islandnet.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: JDBC and numeric datatype...
Date: Wed, 16 May 2001 15:50:00 -0400 (EDT)
Message-ID: <200105161950.PAA05354@jupiter.jw.home> (raw)
In-Reply-To: <NCBBKLMCJOGCLFHOFECNKENIDMAA.wsmuir@islandnet.com>
Scott Muir wrote:
> Can someone suggest the correct way of dealing with the NUMERIC data type
> through JDBC? The attribute in question is a NUMERIC(10,2) (currency)...
> We're thinking of just using a float to handle it... Since this type can be
> much larger than we're using, what should be used in those cases???
Look for some arbitrary precision math library to deal with
it. NUMERIC in PostgreSQL is an exact numeric data type, a
strict requirement when dealing with monetary values in
bookkeeping systems. A single conversion to and back from
floating point violates this requirement already.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: JanWieck@Yahoo.com, wsmuir@islandnet.com
Subject: Re: JDBC and numeric datatype...
In-Reply-To: <200105161950.PAA05354@jupiter.jw.home>
* 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