Postgres backend findings

Dwayne Miller dmiller at espgroup.net
Mon Mar 3 22:27:27 CST 2003


I know the PG backend is being redone, so forgive me if the following is 
OBE....

- During ./configure, the line that tries to compile a file looking for 
the location of the postgres headers returns some warnings.  I had to 
add a "-w" flag to the compile step so that the warnings would be 
suppressed and the configure step would succeed.  The warnings were 
something about "/usr/include" path being redefined.  I'm not sure 
what's going on here.

- After successful compile, trying to save to a postgres database 
failed.  Looks like the logic tries to save to an existing database 
first.  In my case, the PG database existed, but none of the gnucash 
tables existed.  Well, it tries to determine the version of the database 
by querying gncversion.  That table does not exist, so the 
pgendVersionTable creates one.  Gnucash then reports that the version is 
out of date and asks if I want to upgrade, but that fails because none 
of the remaining table have been created yet.

It looks like the high level logic wants to try to save to an existing 
database by calling pgend_session_begin with create_new_db as false.  If 
that fails, then it will recall pgend_session_begin with create_new_db 
as true.  But it looks like the first pass through pgend_session_begin 
ends up with a single table being created, and the second pass fails 
because that is all that exists.

I can try to rework the logic in pgend_session_begin() unless that's 
already been updated (I'm in v1.8.1 code).

Dwayne



More information about the gnucash-user mailing list