Setting up gnucash to use postgesql back end - close but no cigar ...

John Ralls jralls at ceridwen.us
Thu Mar 26 19:21:43 EDT 2015


> On Mar 27, 2015, at 3:56 AM, Geert Janssens <geert.gnucash at kobaltwit.be> wrote:
> 
> On Friday 13 March 2015 09:07:55 John Ralls wrote:
>>> On Mar 13, 2015, at 8:32 AM, AC <gnucash at acarver.net> wrote:
>>> 
>>> There are datatypes built into some databases that can support
>>> larger
>>> exact formats.  For example, MySQL has an exact decimal format that
>>> supports up to 65 places of precision (total of both left and right
>>> of the decimal point, see
>>> http://dev.mysql.com/doc/refman/5.6/en/fixed-point-types.html and
>>> the
>>> related documents on precision math
>>> http://dev.mysql.com/doc/refman/5.6/en/precision-math.html). 
>>> Internally the number is represented in a binary format that are
>>> encoded to remain exact.
>>> 
>>> The float type is the other large number format but it represents
>>> approximate values rather than exact and doesn't use the precision
>>> math libraries.
>>> 
>>> It may be a hard call to say that the decimal split be in a certain
>>> location.  For example, should the split be (7,58) which allows
>>> transactions up to an integer value of 9,999,999 (seven 9's) plus
>>> the
>>> remaining 58 positions of fractional value or do users need larger
>>> integer portions?  How many fractional positions are truly required?
>>> With the exception of a small number of currencies, financial
>>> systems
>>> already round off transactions at the moment of calculation and do
>>> not carry arbitrary precision through to completion (leading to the
>>> plot device of the Office Space movie).
>> 
>> Unfortunately SQLite3 doesn't support decimals, only floats. SQLite3
>> is the only F/LOSS serverless SQL implementation, so being able to
>> use it is a hard requirement. We don't want to force the average user
>> to have to deal with setting up a MySql server just to run GnuCash.
>> 
> How about embedded mariadb [1] ? Does that count as serverless ? I don't 
> know much about it, so I don't know if that allows to create independent 
> gnucash books (like separate files with sqlite).
> 
> Geert
> 
> [1] https://mariadb.com/kb/en/mariadb/embedded-mariadb-interface/

Geert,

Thanks for the link. I didn't know that MariaDB had that capability. 

It looks like it's just removing the communication layer between the server and the client so that the application's client code operates directly on the server. It's not clear to me what that means in terms of creating users, setting privileges, performing backups, migrating between versions, and so on. I suspect that we'd have to expose UI to do all of that in GnuCash, but it's possible that they ship a configuration app along with it. The only way to know for certain will be to try it out, so I'll make a note to look into it when the time comes.

Regards,
John Ralls






More information about the gnucash-user mailing list