I’ve been working on a ledger implementation in pure PostgreSQL called pgledger. As I’ve written about previously, I think more applications should use double-entry ledgers.