Re:Using Redundant Conditions to Unlock Indexes in MySQL
by wswope on Wednesday June 07, 2023 @04:46PM
(#36233304)
Yeah, you've got the right idea. Specifically, functions that operate on TIMESTAMPTZ aren't typically marked as IMMUTABLE (because their output implicitly depends on the connection-level time zone setting), and that IMMUTABLE flag is required for functions used in indexed expressions.
https://www.postgresql.org/docs/current/xfunc-volatility.htm...
Could you expand on why it's not deterministic? I thought timestamptz was 8-byte microseconds since the epoch. Is the problem that the timestamptz uses the server timezone?