SQL only work in single-update mode

Linas Vepstas linas@linas.org
Wed, 9 Jan 2002 23:24:12 -0600


On Tue, Jan 08, 2002 at 10:30:33PM +0000, Klaus Dahlke was heard to remark:
> Hi all,
> 
> I started with a new chart of account into year 2002. The use of teh postgres interface I tried with just two accounts: a bank account and the opening balance. When I save these two accounts by SAVE AS: postgres://localhost/new_ac?mode=single-update, new_ac issaved. If I load gnucash with
> 
> postgres://localhost/new_ac?mode=single-update, everything is fine, but if I load the database with the command postgres://localhost/new_ac only, no numbers are shown and the message
> 
>  Warning: PrintAmountInternal: Bad numeric.
> 
> is shown. But the numbers can be seen via standard sql-staements. I got th e sql-version only to work when I store gnucash with single-update and when I load with single-update.
> 
> I run gnucsh 1.6.5 with postgresql-7.1.3-11 on a 2.4.10 (gnucash/gnome is compiled from source, the system is SuSE 7.3)

I'll see if I can reproduce this problem.  

If you open any given account, you will see that all of the transactions
are there (and, after you do this, the balance for that account should 
then become correct on the main page).

In multi-user mode, none of the transactions are loaded into gnucash
initially; they are only loaded when you open a register for an account
(or run certain reports).  The sql server is queried for the account 
balances only, and this seems not to be working. 

The balances are computed using some fancy SQL statements.  I know that
there were incompatibilites between postgres 6.5 and 7.0 for how these
statements work; I also know that dave changed the way that these
functions work.  So it is possible that the balances work on postgres
7.2 but not on 7.1 . Or something like that.

--linas



-- 
pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933