Closed palmerj closed 11 years ago
Thanks. I thought I had this covered but was just for GDAL. Delayed version checking till DS initialisation and pushed checking into subclasses. e.g.
def versionCheck(self):
'''SpatiaLite/SQLite version checker'''
from VersionChecker import VersionChecker,UnsupportedVersionException
slv_cmd = 'file '+str(self._commonURI(None))
slv_ver = VersionChecker.getVersionFromShell(slv_cmd,'SQLite (\d+.\w+) database')
if VersionChecker.compareVersions(VersionChecker.SpatiaLite_MIN, slv_ver if slv_ver is not None else VersionChecker.SpatiaLite_MIN):
raise UnsupportedVersionException('SpatiaLite version '+str(slv_ver)+' does not meet required minumum '+str(VersionChecker.SpatiaLite_MIN))
return True
Great - Looks good.
Any reason to only support PostgreSQL 9.0+? I would have thought 8.4+ would be easy to support. Which specific 9.0 features are you using?
BTW. 8.4 is still a fully supported version for the PostgreSQL community. PostGIS 2.0 also works with 8.4+. PostGIS 2.1 will however require 9.0.
Thanks.
No good reason, was just setting the minimum back to a last major release before a confirmed working version. Its 8.4 now
Cool.
In many cases windows users don't have the psql process available. In this case the version checking will fail. However the GDAL/OGR library has PG LIB support as part of the postgresql driver.
A better way might just be to use GDAL to get the version. i.e