Get the latest tech news

Footguns with Postgres “at time zone 'UTC'”


And why you may need to repeat AT TIME ZONE 'UTC' twice. SUMMARY * AT TIME ZONE 'UTC' converts the data type from timestamptz to timestamp (example). * Now you are inadvertently using the timestamp without time zone (aka timestamp) data type, which is markedly discouraged. * There are tons of footguns with timestamp. * For example, the equality of timestamp and timestamptz will always be false. * Adding a month with + INTERVAL '1 months' is timezone-dependent. If your product

None

Get the Android app

Or read this on Hacker News

Read more on:

Photo of time zone

time zone

Photo of utc

utc

Photo of Postgres

Postgres

Related news:

News photo

Postgres SELECT DISTINCT Does Not Scale

News photo

Tin: full-text search for Postgres

News photo

Training a 4B model to produce 81% faster query plans than Postgres