GDA: empty PostgreSQL table failed workaround

Derek Atkins warlord at MIT.EDU
Wed Feb 13 14:41:45 EST 2008

Quoting Greg Troxel <gdt at>:

>  Saving to the db deletes all tables and then recreates them.  It
>  therefore deleted the slot_id without the default value.  It wouldn't
>  have touched the sequence.  I'll need to build your workaround into a
>  rev and then let you try it.  There's also an argument to be made that I
>  should create some test cases and set up automated tests for sqlite,
>  mysql and psql.  Maybe once I'm over these initial hurdles and some
>  people are working with the code.
> I'm a gnucash newbie still, but the notion of 'saving' to a database and
> deleting all the tables seems very odd to me.  I would think that
> database backends had two nice features over files:

I think this "saving to a database" really means "When you use File ->
Save As and supply a database target"..  Which means when you're doing
a conversion from XML/File to GDA/DB it will delete and create the
database as part of the initialization process.

>  can be remote
>  allow multiple people to edit transactions etc. at once, with proper 
> locking.
> So I'd expect there to be not such a notion of saving, and having
> changes be propagated as they are made.

That's certainly true once you have an instantiated database.

> If the database is modifed by delete-restore, then I would hope that's
> wrapped in a transaction.


> Sorry if this sounds critical and out of left field - but I was totally
> surprised by the comment.

I think it's just loose language here.


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list