X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/051f3720ce142b7bc70c4d7e30f28cf9db106d88..c41f2fed2133668dc3179813261d39d3ff69cbdd:/nominatim/db/sql_preprocessor.py diff --git a/nominatim/db/sql_preprocessor.py b/nominatim/db/sql_preprocessor.py index 31b4a8c0..2e11f571 100644 --- a/nominatim/db/sql_preprocessor.py +++ b/nominatim/db/sql_preprocessor.py @@ -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: