Re-saving multi-currency databases to backend fails

VW Fan vw_fan17@yahoo.com
Wed, 6 Jun 2001 18:48:07 -0700 (PDT)


Not sure which is the factor (don't have time to try
multiple variations, given how slow I am to actually
create accounts and transactions).

I'm playing around with a multi-currency setup, as
described in the manual. I saved several
multi-currency transactions, no problem, everything
saves.

Then, I tried to make a copy of this database, by
doing a "save as" and giving it a new
postgres://localhost/db URL. 

It bombs with (info on the xterm):

Info: pgendStoreOneTransactionOn...(): sending query
INSERT INTO gncTransaction (num, description,
currency, last_modified, date_entered, date_posted,
version, transGUID) VALUES ('1', 'Bank to Customer 2',
'', 'NOW', '2001-06-06 18:09:52.000000 -0400',
'2001-06-05 23:00:00.000000 -0400', 3,
'9dd82d29e89b378462b8c6b3c940adc7');
Info: pgendStoreOneTransactionOn...(): clearing result
0
Error: pgendStoreOneTransactionOn...(): finish query
failed:
        ERROR:  ExecAppend: rejected due to CHECK
constraint gnctransaction_currency


You'll note that the currency field is, in fact, equal
to '', which fails the check constraint.

However, in the original gnctransaction table, the
currency field is NOT empty. 

So, I'm not sure what's happening - is it failing to
reload the currency value upon startup, or is it
failing to insert it? 

Any thoughts?

Mattias

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/