Lists: | pgsql-bugs |
---|
From: | Unprivileged user <nobody> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | General Bug Report: Incorrect subtraction - rounding error - should NOT round! |
Date: | 1999-01-12 02:37:11 |
Message-ID: | 199901120237.VAA01180@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Jeffrey Springer
Your email address : jspringr(at)savemail(dot)com
Category : runtime: back-end: SQL
Severity : critical
Summary: Incorrect subtraction - rounding error - should NOT round!
System Configuration
--------------------
Operating System : FreeBSD 2.2.7
PostgreSQL version : 6.3.2
Compiler used : gcc 2.7
Hardware:
---------
AMD K6 with 32M Ram
Versions of other tools:
------------------------
gmake
--------------------------------------------------------------------------
Problem Description:
--------------------
I put together a banking web-site using Postgres. I put a
check and deducted the amount from the balance column of
the bank_account table. The result was incorrect so I tested
it inside psql instead of my C++ program but got the
same result.
--------------------------------------------------------------------------
Test Case:
----------
template1=> select 166952.9 - 166384.34 ;
?column?
----------------
568.559999999998
(1 row)
--------------------------------------------------------------------------
Solution:
---------
--------------------------------------------------------------------------