port index creation to python

Also switches to jinja-based preprocessing, which allows to
simplify the SQL files. Use 'if not exists' where possible
so that the step can be rerun to fix missing indexes.
This commit is contained in:
Sarah Hoffmann
2021-03-04 10:55:24 +01:00
parent eacabb0e96
commit 09f4d767e4
12 changed files with 148 additions and 137 deletions

View File

@@ -270,3 +270,5 @@ ALTER TABLE ONLY wikipedia_redirect ADD CONSTRAINT wikipedia_redirect_pkey PRIMA
-- osm2pgsql does not create indexes on the middle tables for Nominatim
-- Add one for lookup of associated street relations.
CREATE INDEX planet_osm_rels_parts_associated_idx ON planet_osm_rels USING gin(parts) WHERE tags @> ARRAY['associatedStreet'];
GRANT SELECT ON table country_osm_grid to "{{config.DATABASE_WEBUSER}}";