diff options
Diffstat (limited to 'django/db/backends')
| -rw-r--r-- | django/db/backends/base/features.py | 4 | ||||
| -rw-r--r-- | django/db/backends/postgresql/features.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/django/db/backends/base/features.py b/django/db/backends/base/features.py index 7626595741..22c2990e77 100644 --- a/django/db/backends/base/features.py +++ b/django/db/backends/base/features.py @@ -229,6 +229,10 @@ class BaseDatabaseFeatures: supports_select_difference = True supports_slicing_ordering_in_compound = False + # Does the database support SQL 2003 FILTER (WHERE ...) in aggregate + # expressions? + supports_aggregate_filter_clause = False + # Does the backend support indexing a TextField? supports_index_on_text_field = True diff --git a/django/db/backends/postgresql/features.py b/django/db/backends/postgresql/features.py index 647fb9dc7f..3c7a7af80f 100644 --- a/django/db/backends/postgresql/features.py +++ b/django/db/backends/postgresql/features.py @@ -51,6 +51,10 @@ class DatabaseFeatures(BaseDatabaseFeatures): $$ LANGUAGE plpgsql;""" @cached_property + def supports_aggregate_filter_clause(self): + return self.connection.pg_version >= 90400 + + @cached_property def has_select_for_update_skip_locked(self): return self.connection.pg_version >= 90500 |
