Can't use concat function in Postgres (9.3) index
The reason CONCAT
is not IMMUTABLE
was explained by Tom Lane in this post:
concat() invokes datatype output functions, which are not necessarily immutable. An easy example is that timestamptz_out's results depend on the TimeZone setting.
I.e. that's due to the fact that it will accept non-text input, which may change based on session settings when converted to text.
You'll probably have to roll your own function for this.