X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fb3353b854f40b8fd97ea942d3d9814e80e14779..7cb7cf848d69e818cb3cccd656c4a34713316264:/nominatim/tools/check_database.py diff --git a/nominatim/tools/check_database.py b/nominatim/tools/check_database.py index 265f8666..2d57c5ee 100644 --- a/nominatim/tools/check_database.py +++ b/nominatim/tools/check_database.py @@ -47,7 +47,7 @@ def _check(hint=None): return decorator -class _BadConnection: # pylint: disable=R0903 +class _BadConnection: def __init__(self, msg): self.msg = msg @@ -85,7 +85,6 @@ def _get_indexes(conn): 'idx_placex_parent_place_id', 'idx_placex_geometry_reverse_lookuppolygon', 'idx_placex_geometry_placenode', - 'idx_placex_housenumber', 'idx_osmline_parent_place_id', 'idx_osmline_parent_osm_id', 'idx_postcode_id', @@ -95,6 +94,9 @@ def _get_indexes(conn): indexes.extend(('idx_search_name_nameaddress_vector', 'idx_search_name_name_vector', 'idx_search_name_centroid')) + if conn.server_version_tuple() >= (11, 0, 0): + indexes.extend(('idx_placex_housenumber', + 'idx_osmline_parent_osm_id_with_hnr')) if conn.table_exists('place'): indexes.extend(('idx_placex_pendingsector', 'idx_location_area_country_place_id',