X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2e493fec469b130f97addba94d2834f6e9099672..815e3cccf6840d935e5a708588700cca23b976e9:/nominatim/tools/database_import.py?ds=inline diff --git a/nominatim/tools/database_import.py b/nominatim/tools/database_import.py index 38635c34..50938c19 100644 --- a/nominatim/tools/database_import.py +++ b/nominatim/tools/database_import.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# This file is part of Nominatim. (https://nominatim.org) +# +# Copyright (C) 2022 by the Nominatim developer community. +# For a full list of authors see the git log. """ Functions for setting up and importing a new Nominatim database. """ @@ -228,7 +234,7 @@ def create_search_indices(conn, config, drop=False): bad_indices = [row[0] for row in list(cur)] for idx in bad_indices: LOG.info("Drop invalid index %s.", idx) - cur.execute('DROP INDEX "{}"'.format(idx)) + cur.execute(pysql.SQL('DROP INDEX {}').format(pysql.Identifier(idx))) conn.commit() sql = SQLPreprocessor(conn, config)