Missing gncGUIDCache table in PG Backend

Matthew Vanecek mevanecek at yahoo.com
Wed Aug 13 20:49:30 CDT 2003


On Wed, 2003-08-13 at 19:26, Linas Vepstas wrote:
> On Tue, Aug 12, 2003 at 12:09:45AM -0500, Matthew Vanecek was heard to remark:
> > Linas can probably answer this.  I was doing a little regression
> > testing, and discovered that for the 1.0.0 -> 1.1.1 PG backend upgrade,
> > the upgrade referenced a gncGUIDCache table that does not exist.  I
> > cannot find a reference to creating this table anywhere.  Is this
> > perhaps something that never got committed to CVS, or is in another
> > branch and didn't make it to HEAD?  I did a search via the CVS Web
> > interface, and all it gave me was the UPDATES in upgrade.c and a couple
> > of DROPs.  Any ideas, or is this a removable upgrade?
> 
> I think you still misunderstand what 'upgrade' does.
> 

No, I understand it quite well.  I may not have framed the question
clearly, though.

> Version 1.0.0 used to have a table called gncGUIDCache.  It was a bad
> idea. So I got rid of it.  The way to do this was with upgrade.c,
> which added a new column to an existing table, copied from gncGUIDcache
> to the new column, and then totally destroyed the gncGUIDCache table.
> Which is why you will not find it anywhere else in the source code. 
> 
> You are not supposed to be able to find it anywhere else. Working
> as designed.  The only place where you will find this table is in
> old databases that were created with gnucash 1.4 or 1.6, and the 
> user still has not run gnucash-1.8.x  If the user had run gnucash-1.8, 
> then the upgrade process would have deleted this table.
> 
> The easiest (only rational way) to test the upgrade is to get a
> copy of gnucash-1.4 or 1.6, create a postgres account, and then see
> if gnucash-1.8.4 can open and work with it.   
> 
> The whole point of the upgrade is to create, alter and/or drop tables.  
> When a table is dropped, (e.g. gncEntry), it will not appear anywhere
> else, ever again, in the source code.  (You did drop gncentry, didn't
> you?) 

Of course. :)  What I was trying to accomplish was to test each of the
upgrades in upgrade.c.  I did this by undoing whatever it was the
upgrade did and adjusting gncVersion accordingly. I could only
back-level to 1.1.1, though, because that table is missing.  upgrade.c
would then exercise the relevant bit of code.  However, because the
gncGUIDcache table was dropped, and it's references (apparently) removed
from Gnucash, I don't know what the table looks like and therefore
cannot recreate the 1.0.0-->1.1.1 upgrade (at least, not without the
previous version of Gnucash you mention).

Derek suggested not worrying about it, as it's unlikely anyone has an
installation that old using the database backend.  I'm inclined to
agree, and have moved on in life.  The other upgrades work (now), so all
is well, I reckon.

Thanks for the response,

-- 
Matthew Vanecek
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
********************************************************************************
For 93 million miles, there is nothing between the sun and my shadow except me.
I'm always getting in the way of something...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : /pipermail/attachments/20030813/aec45664/attachment.bin


More information about the gnucash-devel mailing list