mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-23 13:44:36 +03:00
Merge pull request #3087 from lonvia/conditional-spgist
Disable SPGist for PostgreSQL < 11
This commit is contained in:
commit
a7bd39b62a
@ -57,9 +57,11 @@ def _setup_postgresql_features(conn: Connection) -> Dict[str, Any]:
|
||||
"""
|
||||
pg_version = conn.server_version_tuple()
|
||||
postgis_version = conn.postgis_version_tuple()
|
||||
pg11plus = pg_version >= (11, 0, 0)
|
||||
ps3 = postgis_version >= (3, 0)
|
||||
return {
|
||||
'has_index_non_key_column': pg_version >= (11, 0, 0),
|
||||
'spgist_geom' : 'SPGIST' if postgis_version >= (3, 0) else 'GIST'
|
||||
'has_index_non_key_column': pg11plus,
|
||||
'spgist_geom' : 'SPGIST' if pg11plus and ps3 else 'GIST'
|
||||
}
|
||||
|
||||
class SQLPreprocessor:
|
||||
|
Loading…
Reference in New Issue
Block a user