How can I index a to_char() of a column?
I have tried:
adam_db=> CREATE INDEX updates_hourly_idx
ON updates (to_char(update_time, 'YYYY-MM-DD HH24:00'));
But got the error:
ERROR: functions in index expression must be marked
IMMUTABLE
Which seems strange, since the to_char() of a timestamp is reasonably immutable.
Any ideas how to generate that index?