summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql/features.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-19 12:25:20 +0100
committerGitHub <noreply@github.com>2021-01-19 12:25:20 +0100
commit5371342ed66f5ff9feae9dc4586ec43830bbeca6 (patch)
treeb5c5a6f3b264770af4c34411f72c43c5b79a82ce /django/db/backends/postgresql/features.py
parent10d126198434810529e0220b0c6896ed64ca0e88 (diff)
downloaddjango-5371342ed66f5ff9feae9dc4586ec43830bbeca6.tar.gz
Fixed #32357 -- Dropped support for PostgreSQL 9.6 and PostGIS 2.3.
Diffstat (limited to 'django/db/backends/postgresql/features.py')
-rw-r--r--django/db/backends/postgresql/features.py21
1 files changed, 4 insertions, 17 deletions
diff --git a/django/db/backends/postgresql/features.py b/django/db/backends/postgresql/features.py
index 84259c0c19..722bfe0475 100644
--- a/django/db/backends/postgresql/features.py
+++ b/django/db/backends/postgresql/features.py
@@ -58,6 +58,10 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_deferrable_unique_constraints = True
has_json_operators = True
json_key_contains_list_matching_requires_list = True
+ test_collations = {
+ 'non_default': 'sv-x-icu',
+ 'swedish_ci': 'sv-x-icu',
+ }
django_test_skips = {
'opclasses are PostgreSQL only.': {
@@ -66,16 +70,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
}
@cached_property
- def test_collations(self):
- # PostgreSQL < 10 doesn't support ICU collations.
- if self.is_postgresql_10:
- return {
- 'non_default': 'sv-x-icu',
- 'swedish_ci': 'sv-x-icu',
- }
- return {}
-
- @cached_property
def introspected_field_types(self):
return {
**super().introspected_field_types,
@@ -85,10 +79,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
}
@cached_property
- def is_postgresql_10(self):
- return self.connection.pg_version >= 100000
-
- @cached_property
def is_postgresql_11(self):
return self.connection.pg_version >= 110000
@@ -100,10 +90,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
def is_postgresql_13(self):
return self.connection.pg_version >= 130000
- has_brin_autosummarize = property(operator.attrgetter('is_postgresql_10'))
has_websearch_to_tsquery = property(operator.attrgetter('is_postgresql_11'))
- supports_table_partitions = property(operator.attrgetter('is_postgresql_10'))
supports_covering_indexes = property(operator.attrgetter('is_postgresql_11'))
supports_covering_gist_indexes = property(operator.attrgetter('is_postgresql_12'))
supports_non_deterministic_collations = property(operator.attrgetter('is_postgresql_12'))
- supports_alternate_collation_providers = property(operator.attrgetter('is_postgresql_10'))