State of Postgres support, and/or command line interface?

Klaus Dahlke klaus.dahlke at gmx.de
Sat May 19 17:45:07 EDT 2007


On Sat, 19 May 2007 12:05:33 +0200
Klaus Dahlke <klaus.dahlke at gmx.de> wrote:

> On Fri, 18 May 2007 19:38:05 -0400 (EDT)
> "Josh Sled" <jsled at asynchronous.org> wrote:
> 
...
> 
> Hi all, please find attached three files:
> 1) gnctables.sql: creates the old gnucash relevant tables in an existing database. Please set the user accordingly in the script first and please be aware that the new features like customers, scheduled transaction etc are not represented by the table structure. But for reporting purposes the table structure is good enough.
> 
> 2) gnc2sql.pl: script for initial data load. Please check line 35 for the proper file name for the gnucash zipped xml file, check line 68 for connecting to the database.
> 
> 3) gnc2sql_update.sql: script for delta load. Unfortunately, it has to read the entire xml-file, but posts only the transactions since last upload/delta-upload. As above check line 39 for the file where the date of last upload is stored, check line 49 for the gnucash-file and check line 81 for connecting to the database. This script doesn't create new accounts or new commodities as neither of the tables have a date filed. You have to do that 'by hand' by evaluating the accountguid of a split. My assumption is that having new accounts and new commodities is not so often that doing it manually is sufficient. If the delta upload fails for what reason ever, you may delete the content of all tables and just run the initial load script (gnc2sql.pl) again.
> 

Hi all,
I am actually considering whether to base the delta-upload not on the xac-file itself but rather evaluating the log-files which contain the information on transactions since last save. That would speed up the time when posting the delta-upload.

The first column in the log-files is named 'mod'. Could anybody shed alight on the meaning of that column, what are the possibles entries and what are the meaning of the entries. What I have seen so far is C, B, D and m as entries. Knowing the meaning, then it hopefully will just be posting values (incl delete) to gncsplit and gnctransaction.

Cheers,
Klaus


More information about the gnucash-user mailing list