How do you store money amounts in your database?
Arjun Mehta@arjunmehta
Written by
Arjun Mehta
Backend engineer at a lending startup in Bengaluru. Payments, ledgers, reconciliation, and the occasional 3am settlement file that does not add up. Postgres fan. Will talk about idempotency keys until you leave.
Get the best of #ledger_lines weekly
One email each Monday with the most useful posts. No spam; unsubscribe in one click.
Comments
Sign in to join the conversation.
Sign in to commentTunde Adebayo@tunde_ade
i picked float once in 2019 and i still have nightmares. voted ORM because honesty is important
Tomasz Kowalski@tomasz_k
numeric(19,4) in bank since forever. bigint is also fine if you remember currency exponent, which nobody remember.