On Fri, Jul 22, 2011 at 11:31 AM, WR Consulting <[email protected]> wrote:
> On Fri, Jul 22, 2011 at 10:37 AM, Chris Travers <[email protected]> 
> wrote:
> ...
>> If you look at the early LedgerSMB upgrade scripts from SQL-ledger,
>> one of the things we did can be done to solve the floating point
>> problem:
>>
>> ALTER TABLE acc_trans ALTER COLUMN amount TYPE numeric;
>>
>> This moves the amount column from a base 2 representation to a base
>> 1000 representation, which can map losslessly to base 10.
>
> I like this solution.  I think I will do it.  Of course, this means
> that SL upgrades will be non-trivial, but I don't plan to upgrade, so
> that's a non-issue.  I once had to restore my SL installation from a
> much newer version of SL than I had been using -- that was an
> experience I'd rather not repeat, ever.  So, I think I'll save a
> before & after copy of my SL change.  Just in case.  :-)

I don't know why they would be a problem, unless an upgrade installs a
stored procedure that tries to dump doubles into that column.

Or at least it has never affected an lsmb upgrade.

Best Wishes,
Chris Travers
_______________________________________________
SQL-Ledger mailing list
[email protected]
http://lists.ledger123.com/mailman/listinfo/sql-ledger

Reply via email to