mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
use psycopg's SQL quoting where possible
Use the SQL formatting supplied with psycopg whenever the query needs to be put together from snippets.
This commit is contained in:
@@ -383,9 +383,9 @@ class LegacyICUNameAnalyzer:
|
||||
if word_tokens:
|
||||
cur.execute("""INSERT INTO word (word_id, word_token, country_code,
|
||||
search_name_count)
|
||||
(SELECT nextval('seq_word'), token, '{}', 0
|
||||
(SELECT nextval('seq_word'), token, %s, 0
|
||||
FROM unnest(%s) as token)
|
||||
""".format(country_code), (list(word_tokens),))
|
||||
""", (country_code, list(word_tokens)))
|
||||
|
||||
|
||||
def process_place(self, place):
|
||||
|
||||
Reference in New Issue
Block a user