logoalt Hacker News

flossly • today at 11:36 AM • 1 reply • view on HN

Lame article tbh.

It's better to use `timestampz` everywhere; the author seems to know but then uses `timestamp`...

Most of the functions showcased one will not need as one will do that in the app-layer or even in the frontend code.


Replies

LittleLily • today at 12:32 PM

Given that most people will be doing most of the time functions in their application code anyway like you said, why would it not be better to just use `timestamp` everywhere then? They both store the same data and the only difference is that `timestamptz` adds an unnecessary conversion on read and write operations (which also changes based on the system's timezone) that you should be doing in your application anyway.

➕ show 2 replies