Bug reference: 14745 Logged by: Bob Jones Email address: 007reader@gmail.com PostgreSQL version: 10beta2 Operating system: Debian in Docker container Description:
According to https://www.postgresql.org/about/news/1763/ Beta 2 marked to_tsvector(regconfig, json[b]) immutable, but it still doesn't work, at least in the docker version of Beta 2. Here is the result:
create table test (j JSON, jb JSONB); CREATE TABLE
create index j_ixd on test using gin(to_tsvector(j)); ERROR: functions in index expression must be marked IMMUTABLE
to_tsvector(regconfig, json[b]) and to_tsvector(json[b]) are not the same thing.
Only the first is immutable, you are using the second.