summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-09-22 06:01:11 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-09-22 06:03:19 +0200
commit2566f92544d587de30c4b50b292c59128554e76c (patch)
tree66c9aec6cd1806a8184eed89046dd8db012b645c /django/db/backends/postgresql
parentfb5dd118e955e34c84effc295aaabcec12e6295b (diff)
[5.0.x] Fixed #34840 -- Avoided casting string base fields on PostgreSQL.
Thanks Alex Vandiver for the report. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca. Backport of 779cd28acb1f7eb06f629c0ea4ded99b5ebb670a from main.
Diffstat (limited to 'django/db/backends/postgresql')
-rw-r--r--django/db/backends/postgresql/operations.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/django/db/backends/postgresql/operations.py b/django/db/backends/postgresql/operations.py
index aa839f5634..6eefb6a363 100644
--- a/django/db/backends/postgresql/operations.py
+++ b/django/db/backends/postgresql/operations.py
@@ -154,17 +154,6 @@ class DatabaseOperations(BaseDatabaseOperations):
def lookup_cast(self, lookup_type, internal_type=None):
lookup = "%s"
-
- if lookup_type == "isnull" and internal_type in (
- "CharField",
- "EmailField",
- "TextField",
- "CICharField",
- "CIEmailField",
- "CITextField",
- ):
- return "%s::text"
-
# Cast text lookups to text to allow things like filter(x__contains=4)
if lookup_type in (
"iexact",