> corp=# select sum(amount) from acc_trans where trans_id=19721 and > chart_id=10019; > sum > ---------------------- > -1.4210854715202e-14 [expected to be 0] Floating-point numbers are typically inaccurate like that, and if you rely in equality comparisons, you're doing something wrong. You should use numeric or fix your application to take these errors into account. -- Peter Eisentraut http://developer.postgresql.org/~petere/