X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2be00f37c175630e23e1ee6a4aa6897fda41eb33..1edcd7208b6c95b360e763633042388c07814d39:/utils/specialphrases.php?ds=sidebyside diff --git a/utils/specialphrases.php b/utils/specialphrases.php index 3baf09f2..5b3abe40 100755 --- a/utils/specialphrases.php +++ b/utils/specialphrases.php @@ -81,8 +81,11 @@ } } + echo "create index idx_placex_classtype on placex (class, type);"; + foreach($aPairs as $aPair) { + if ($aPair[1] == 'highway') continue; echo "create table place_classtype_".pg_escape_string($aPair[0])."_".pg_escape_string($aPair[1])." as "; echo "select place_id as place_id,st_centroid(geometry) as centroid from placex where "; @@ -94,5 +97,9 @@ echo "CREATE INDEX idx_place_classtype_".pg_escape_string($aPair[0])."_".pg_escape_string($aPair[1])."_place_id "; echo "ON place_classtype_".pg_escape_string($aPair[0])."_".pg_escape_string($aPair[1])." USING btree(place_id);\n"; + echo "GRANT SELECT ON place_classtype_".pg_escape_string($aPair[0])."_".pg_escape_string($aPair[1])." TO \"www-data\";"; + } + + echo "drop index idx_placex_classtype;"; }