Comment

Comment by yafetn

I’d also add:

— If you’re using JSON to pass around monetary quantities (eg. from the frontend to the backend), put them in strings as opposed to the native number type. You never know what the serializers and deserializers across languages will do to your numbers (round them, truncate them etc.).

— Start recording the currency of the transactions as early as possible. It can be a separate column in your table.

— Use TIMESTAMPTZ. Always.

parent yafetn 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton