1 -- SPDX-License-Identifier: GPL-2.0-only
3 -- This file is part of Nominatim. (https://nominatim.org)
5 -- Copyright (C) 2022 by the Nominatim developer community.
6 -- For a full list of authors see the git log.
8 -- insert creates the location tables, creates location indexes if indexed == true
9 CREATE TRIGGER placex_before_insert BEFORE INSERT ON placex
10 FOR EACH ROW EXECUTE PROCEDURE placex_insert();
11 CREATE TRIGGER osmline_before_insert BEFORE INSERT ON location_property_osmline
12 FOR EACH ROW EXECUTE PROCEDURE osmline_insert();
14 -- update insert creates the location tables
15 CREATE TRIGGER placex_before_update BEFORE UPDATE ON placex
16 FOR EACH ROW EXECUTE PROCEDURE placex_update();
17 CREATE TRIGGER osmline_before_update BEFORE UPDATE ON location_property_osmline
18 FOR EACH ROW EXECUTE PROCEDURE osmline_update();
20 -- diff update triggers
21 CREATE TRIGGER placex_before_delete AFTER DELETE ON placex
22 FOR EACH ROW EXECUTE PROCEDURE placex_delete();
23 CREATE TRIGGER place_before_delete BEFORE DELETE ON place
24 FOR EACH ROW EXECUTE PROCEDURE place_delete();
25 CREATE TRIGGER place_before_insert BEFORE INSERT ON place
26 FOR EACH ROW EXECUTE PROCEDURE place_insert();
28 CREATE TRIGGER location_postcode_before_update BEFORE UPDATE ON location_postcode
29 FOR EACH ROW EXECUTE PROCEDURE postcode_update();