mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
port code to psycopg3
This commit is contained in:
@@ -138,9 +138,10 @@ def setup_country_tables(dsn: str, sql_dir: Path, ignore_partitions: bool = Fals
|
||||
country_default_language_code text,
|
||||
partition integer
|
||||
); """)
|
||||
cur.execute_values(
|
||||
cur.executemany(
|
||||
""" INSERT INTO public.country_name
|
||||
(country_code, name, country_default_language_code, partition) VALUES %s
|
||||
(country_code, name, country_default_language_code, partition)
|
||||
VALUES (%s, %s, %s, %s)
|
||||
""", params)
|
||||
conn.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user