def postgis_version_tuple(self):
        # Getting the PostGIS version
        version = self.postgis_lib_version()
        m = self.version_regex.match(version)

        if m:
            major = int(m.group('major'))
            minor1 = int(m.group('minor1'))
            minor2 = int(m.group('minor2'))
        else:
            raise Exception('Could not parse PostGIS version string: %s' % version)

        return (version, major, minor1, minor2)
Returns the PostGIS version as a tuple (version string, major,
dataset/ETHPy150Open django/django/django/contrib/gis/db/backends/postgis/operations.py/PostGISOperations.postgis_version_tuple