From 88bf635c356b4d3a47e88dc4142b90060ce3c2ef Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Fri, 19 Apr 2019 02:39:25 -0400 Subject: [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 --- docs/releases/2.2.1.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/releases/2.2.1.txt b/docs/releases/2.2.1.txt index 97fc9fafcd..48cbfb3a8f 100644 --- a/docs/releases/2.2.1.txt +++ b/docs/releases/2.2.1.txt @@ -42,3 +42,7 @@ Bugfixes * Fixed a regression in Django 2.2 where ``IntegerField`` validation of database limits crashes if ``limit_value`` attribute in a custom validator is callable (:ticket:`30328`). + +* Fixed a regression in Django 2.2 where + :class:`~django.contrib.postgres.search.SearchVector` generates SQL that is + not indexable (:ticket:`30385`). -- cgit v1.3