Say that in an older version of PostgreSQL you had an index like this:
-
span class=”st0″>’day’
and now after upgrading to 8.1+ you’re getting:
ERROR: functions in index expression must be marked IMMUTABLE
Say that in an older version of PostgreSQL you had an index like this:
and now after upgrading to 8.1+ you’re getting:
ERROR: functions in index expression must be marked IMMUTABLE
All right, this is really no rocket science it’s just something I needed and took me some time to figure out.
or more robust version: