Problem Accounting with PostGreSQL