Re: rounding problems

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Justin <justin(at)emproshunts(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: rounding problems
Date: 2008-05-12 21:50:16
Message-ID: 4828BB98.9010100@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Justin wrote:
> I tried casting them to numeric and it was still wrong

How do the results differ from what you expect? You've posted a bunch of
code, but haven't explained what you think is wrong with the results.

Can you post a couple of SMALL examples and explain how the results are
different from what you expect them to be?

Try the example using the following formats for the literals in your test:

2.0
'2.0'::numeric (this is a BCD decimal)
'2.0'::float4 (this is a C++/IEEE "float")
'2.0'::float8 (this is a C++/IEEE "double")

and see how the results differ.

--
Craig Riniger

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christophe 2008-05-12 21:53:21 Re: rounding problems
Previous Message Alvaro Herrera 2008-05-12 21:32:56 Re: Making sure \timing is on