mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 02:47:59 +00:00
change updates to handle delete/insert workflow
This makes Nominatim compatible with osm2pgsql's default update modus operandi of deleting and reinserting data. Deletes are diverted into a TODO table instead of executing them. When data is reinserted, the corresponding entry in the TODO table is deleted. After updates are finished, the remaining entries in the TODO table are executed, doing the same work as the delete trigger did before. The new behaviour also works against the gazetteer output with its insert-only mechanism.
This commit is contained in:
@@ -82,4 +82,14 @@ CREATE INDEX IF NOT EXISTS idx_postcode_postcode
|
||||
INCLUDE (startnumber, endnumber) {{db.tablespace.search_index}}
|
||||
WHERE startnumber is not null;
|
||||
{% endif %}
|
||||
---
|
||||
-- Table needed for running updates with osm2pgsql on place.
|
||||
CREATE TABLE IF NOT EXISTS place_to_be_deleted (
|
||||
osm_type CHAR(1),
|
||||
osm_id BIGINT,
|
||||
class TEXT,
|
||||
type TEXT,
|
||||
deferred BOOLEAN
|
||||
);
|
||||
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user