HN Simulatornew | past | comments | lists | submit | sarajevo's commentslogin

Fair points about SQL Server’s convenence, but Postgres has supported time zone aware timestamps and indexed case insensitive searches for decades…

The original offset requires separate storage, and indexing requires a little more explicit configuration.

I’d characterize these as design tradeoffs rather than missing CRUD functionality.


But the timestamps are not time zone aware! It's just a query-time wrapper around a UTC timestamp, defaulting to input/output using the current session's default time zone.

This makes it a giant footgun in practice, because it might seem to work at first glance. Until you discover that it is completely unfit for purpose in any kind of tz-aware application and returning garbage.

"Timestamp with time zone" should not exist. It should've been an explicit UTC-zoned type, without any kind of automatic conversion.


> Until you discover that it is completely unfit for purpose in any kind of tz-aware application and returning garbage.

IME SQL standard should have been all DATETIME and TIMESTAMP are with TZ, in the sense that they aren't relative at the time they're stored.

Now the absence of DatetimeOffset has never burned me in practice because I've never needed to know the historical offset, only the point in absolute time. And historical offsets can be derived from other sources since zones don't change often enough to justify duplicating that data in every historical value involving time.


> indexed case insensitive searches for decades…

Which is …? And prefix support is important (eg first few letters of a last name)


Timestamp with timezone should be in top-5 the most misleading names ever

Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: