pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC and numeric datatype...
2+ messages / 2 participants
[nested] [flat]

* JDBC and numeric datatype...
@ 2001-05-11 22:16 Scott Muir <wsmuir@islandnet.com>
  2001-05-16 19:50 ` Re: JDBC and numeric datatype... Jan Wieck <JanWieck@Yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Scott Muir @ 2001-05-11 22:16 UTC (permalink / raw)
  To: pgsql-interfaces

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

Thanks.
S.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: JDBC and numeric datatype...
  2001-05-11 22:16 JDBC and numeric datatype... Scott Muir <wsmuir@islandnet.com>
@ 2001-05-16 19:50 ` Jan Wieck <JanWieck@Yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Jan Wieck @ 2001-05-16 19:50 UTC (permalink / raw)
  To: Scott Muir <wsmuir@islandnet.com>; +Cc: pgsql-interfaces

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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-05-16 19:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-11 22:16 JDBC and numeric datatype... Scott Muir <wsmuir@islandnet.com>
2001-05-16 19:50 ` Jan Wieck <JanWieck@Yahoo.com>

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