Ticket #6433: odd-version-string-fix.diff

File odd-version-string-fix.diff, 754 bytes (added by Trevor Caira, 17 years ago)
  • django/db/backends/postgresql/operations.py

     
    1212            from django.db import connection
    1313            cursor = connection.cursor()
    1414            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]
    1617        return self._postgres_version
    1718    postgres_version = property(_get_postgres_version)
Back to Top