Ticket #6433: odd-version-string-fix.diff
File odd-version-string-fix.diff, 754 bytes (added by , 17 years ago) |
---|
-
django/db/backends/postgresql/operations.py
12 12 from django.db import connection 13 13 cursor = connection.cursor() 14 14 cursor.execute("SELECT version()") 15 self._postgres_version = [int(val) for val in cursor.fetchone()[0].split()[1].split('.')] 15 parts = cursor.fetchone()[0].split()[1].split('.') 16 self._postgres_version = [filter(lambda s: s.isdigit(), val) for val in parts] 16 17 return self._postgres_version 17 18 postgres_version = property(_get_postgres_version)