#30385 closed Bug (fixed)
SearchVector's usage of CONCAT makes it impossible to index against.
| Reported by: | Simon Charette | Owned by: | Simon Charette |
|---|---|---|---|
| Component: | contrib.postgres | Version: | 2.2 |
| Severity: | Release blocker | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
SearchVector was changed in Django 2.2 to allow querying non-text fields (#29582) by using CONCAT which automatically cast such fields to text and deals with NULL value appropriately.
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.
Change History (4)
comment:1 by , 7 years ago
| Patch needs improvement: | unset |
|---|
comment:2 by , 7 years ago
Note:
See TracTickets
for help on using tickets.
PR