mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-13 22:34:07 +00:00
provide wrapper function for DROP TABLE
Use psycopg2 formatting to ensure correct quoting.
This commit is contained in:
@@ -29,7 +29,7 @@ def drop_update_tables(conn):
|
||||
tables = [r[0] for r in cur]
|
||||
|
||||
for table in tables:
|
||||
cur.execute('DROP TABLE IF EXISTS "{}" CASCADE'.format(table))
|
||||
cur.drop_table(table, cascade=True)
|
||||
|
||||
conn.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user