2 ms·
For whoever uses PostgreSQL and needs to see this: 1. Please, please use native datetime objects instead of integers. A bigint (needed to represent datetimes p
by gen220 3y ago
For whoever uses PostgreSQL and needs to see this:
1. Please, please use native datetime objects instead of integers. A bigint (needed to represent datetimes past 2038) is 8 bytes, same as `timestamp`.
2. Please, please store explicit timezone values. Even if they're all UTC and it "feels redundant". `timestamptz` and `timestamp` are both 8 bytes in Postgres.
If you can't articulate the 10x advantage an integer gives you for your particular app (they are vanishingly few in 2024), please, please use `timestamptz`.
thank you <3