This had the unintended side effect of making the generated SQL loose it's
`IMMUTABLE` status as `CONCAT` can generate locale/TZ dependant output
which makes the generated SQL expression impossible to index against.
--
Ticket URL: <https://code.djangoproject.com/ticket/30385>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/30385#comment:1>
Comment (by felixxm):
[https://github.com/django/django/pull/11254 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/30385#comment:2>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"405c8363362063542e9e79beac53c8437d389520" 405c836]:
{{{
#!CommitTicketReference repository=""
revision="405c8363362063542e9e79beac53c8437d389520"
Fixed #30385 -- Restored SearchVector(config) immutability.
Regression in 1a28dc3887e8d66d5e3ff08cf7fb0a6212b873e5.
The usage of CONCAT to allow SearchVector to deal with non-text fields
made the generated expression non-IMMUTABLE which prevents a functional
index to be created for it.
Using a combination of COALESCE and ::text makes sure the expression
preserves its immutability.
Refs #29582. Thanks Andrew Brown for the report, Nick Pope for the
review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30385#comment:3>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"88bf635c356b4d3a47e88dc4142b90060ce3c2ef" 88bf635c]:
{{{
#!CommitTicketReference repository=""
revision="88bf635c356b4d3a47e88dc4142b90060ce3c2ef"
[2.2.x] Fixed #30385 -- Restored SearchVector(config) immutability.
Regression in 1a28dc3887e8d66d5e3ff08cf7fb0a6212b873e5.
The usage of CONCAT to allow SearchVector to deal with non-text fields
made the generated expression non-IMMUTABLE which prevents a functional
index to be created for it.
Using a combination of COALESCE and ::text makes sure the expression
preserves its immutability.
Refs #29582. Thanks Andrew Brown for the report, Nick Pope for the
review.
Backport of 405c8363362063542e9e79beac53c8437d389520 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30385#comment:4>