X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4c72cdaa865d9df7064bc03ff282384b037865a7..2c61fe08a031bd4ccbe47c62c021321e2dff7510:/lib-sql/functions/placex_triggers.sql diff --git a/lib-sql/functions/placex_triggers.sql b/lib-sql/functions/placex_triggers.sql index 01f99715..8524ffc3 100644 --- a/lib-sql/functions/placex_triggers.sql +++ b/lib-sql/functions/placex_triggers.sql @@ -109,7 +109,7 @@ BEGIN RETURN result; END; $$ -LANGUAGE plpgsql STABLE; +LANGUAGE plpgsql STABLE PARALLEL SAFE; CREATE OR REPLACE FUNCTION find_associated_street(poi_osm_type CHAR(1), @@ -200,7 +200,7 @@ BEGIN RETURN result; END; $$ -LANGUAGE plpgsql STABLE; +LANGUAGE plpgsql STABLE PARALLEL SAFE; -- Find the parent road of a POI. @@ -286,7 +286,7 @@ BEGIN RETURN parent_place_id; END; $$ -LANGUAGE plpgsql STABLE; +LANGUAGE plpgsql STABLE PARALLEL SAFE; -- Try to find a linked place for the given object. CREATE OR REPLACE FUNCTION find_linked_place(bnd placex) @@ -404,7 +404,7 @@ BEGIN RETURN NULL; END; $$ -LANGUAGE plpgsql STABLE; +LANGUAGE plpgsql STABLE PARALLEL SAFE; CREATE OR REPLACE FUNCTION create_poi_search_terms(obj_place_id BIGINT, @@ -668,7 +668,7 @@ BEGIN NEW.place_id := nextval('seq_place'); NEW.indexed_status := 1; --STATUS_NEW - NEW.centroid := ST_PointOnSurface(NEW.geometry); + NEW.centroid := get_center_point(NEW.geometry); NEW.country_code := lower(get_country_code(NEW.centroid)); NEW.partition := get_partition(NEW.country_code); @@ -870,7 +870,7 @@ BEGIN END IF; -- Compute a preliminary centroid. - NEW.centroid := ST_PointOnSurface(NEW.geometry); + NEW.centroid := get_center_point(NEW.geometry); -- recalculate country and partition IF NEW.rank_search = 4 AND NEW.address is not NULL AND NEW.address ? 'country' THEN