summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql_psycopg2/operations.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/postgresql_psycopg2/operations.py')
-rw-r--r--django/db/backends/postgresql_psycopg2/operations.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/backends/postgresql_psycopg2/operations.py b/django/db/backends/postgresql_psycopg2/operations.py
index 8e87ed539f..56535e0865 100644
--- a/django/db/backends/postgresql_psycopg2/operations.py
+++ b/django/db/backends/postgresql_psycopg2/operations.py
@@ -195,8 +195,7 @@ class DatabaseOperations(BaseDatabaseOperations):
NotImplementedError if this is the database in use.
"""
if aggregate.sql_function in ('STDDEV_POP', 'VAR_POP'):
- pg_version = self.connection.pg_version
- if pg_version >= 80200 and pg_version <= 80204:
+ if 80200 <= self.connection.pg_version <= 80204:
raise NotImplementedError('PostgreSQL 8.2 to 8.2.4 is known to have a faulty implementation of %s. Please upgrade your version of PostgreSQL.' % aggregate.sql_function)
def max_name_length(self):