summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-05 19:34:16 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-06 13:32:47 +0200
commit4bf4222010fd8e413963c6c873e4088614332ef9 (patch)
tree782a500aebfb3109f9d2fd277036df39a5a5d908 /django
parent02a04ab79ae8c9e1aa10a91ee8b73fc5252a58e8 (diff)
downloaddjango-4bf4222010fd8e413963c6c873e4088614332ef9.tar.gz
Fixed #34459 -- Fixed SearchVector() crash for parameters with % symbol.
Thanks Patryk Zawadzki for the report. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/postgres/search.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/contrib/postgres/search.py b/django/contrib/postgres/search.py
index 4e370aa167..936709c2f8 100644
--- a/django/contrib/postgres/search.py
+++ b/django/contrib/postgres/search.py
@@ -144,10 +144,7 @@ class SearchVector(SearchVectorCombinable, Func):
weight_sql, extra_params = compiler.compile(clone.weight)
sql = "setweight({}, {})".format(sql, weight_sql)
- # These parameters must be bound on the client side because we may
- # want to create an index on this expression.
- sql = connection.ops.compose_sql(sql, config_params + params + extra_params)
- return sql, []
+ return sql, config_params + params + extra_params
class CombinedSearchVector(SearchVectorCombinable, CombinedExpression):