Creating unique customer guid

Geert Janssens janssens-geert at
Sat Oct 8 12:30:51 EDT 2011

On vrijdag 7 oktober 2011, Glen Arason wrote:
> Hello
> I've been evaluating GnuCash and think it will be perfect for my business
> needs.
> I'm using a MySQL db and looking at importing my customers using a sql
> My question relates to the "guid" field which is simply a varchar(32).
> After testing a I have concluded that the giud needs to be a unique
> "32-character hexadecimal number".
> Since my customer id's are unique creating an MD5 hash of the customer id
> sastisfies the above requirement.
> Is there any magic behind the programs guid's that won't be satisfied by an
> MD5 hash?
No, as long as the guid's are unique you should be ok. But note that the guid 
should not only be unique among your customers, but it should be unique among 
all the objects in your data file.

And you probably know already, but I have to formally tell you anyway: what 
you attempt (writing directly to the database outside of gnucash) is very much 
unsupported and can have unexpected results. Not all customer data is stored 
in the customers table. Parts are in the slots table, which is a bit of a 
black hole if you don't have the GnuCash business logic available to handle 

You may get away with it though and I'd be happy to hear about that as well, 
but be careful to test everything afterwards.


> Thank you.
> Glen
> Domain.Support at
> <mailto:Domain.Support at>
> <>
> Leduc/Edmonton Alberta
> (780) 904-8759
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at

More information about the gnucash-devel mailing list