source: subversion/sites/www.openstreetbrowser.org/src/wiki_create_indexes.php @ 29773

Last change on this file since 29773 was 19825, checked in by skunk, 10 years ago

Rework do_all_* scripts

  • rename update_xml.pl to update_xml (it's php and we don't need executables)
  • make use of reworked wiki->stylesheet generation
  • create additional indices
File size: 614 bytes
Line 
1<?
2include("conf.php");
3//$sql=pg_connect("dbname=$db_name user=$db_user password=$db_passwd host=$db_host");
4$request=unserialize(file_get_contents("/osm/skunkosm/request.save"));
5$done=array();
6
7foreach($request as $category=>$d1) {
8  foreach($d1 as $importance=>$d2) {
9    foreach($d2 as $table=>$d3) {
10      if($d3['columns']) foreach($d3['columns'] as $column=>$values) {
11        if((!$done[$table])||(!$done[$table][$column])) {
12          $qry="create index planet_osm_{$table}_{$column} on planet_osm_{$table}(\"{$column}\");";
13          print "$qry\n";
14          //pg_query($qry);
15
16          $done[$table][$column]=1;
17        }
18      }
19    }
20  }
21}
Note: See TracBrowser for help on using the repository browser.