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

Geert Janssens geert.gnucash at kobaltwit.be
Thu Mar 26 14:56:04 EDT 2015


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/


More information about the gnucash-user mailing list