This has been discussed before, e.g.: http://www.mail-archive.com/geocoding@openstreetmap.org/msg00112.html
My setup is Postgres 9.0 with postgis 1.5.2 on Ubuntu Lucid (10.04) 64bit, osm2pgsql SVN version 0.70.5 (the very recent) The following steps have been taken (according to http://wiki.openstreetmap.org/wiki/Nominatim/Installation) to set up a Nominatim/Gazetteer stack: createdb -U postgres asiagazetteer createlang -U postgres plpgsql asiagazetteer psql -U postgres -d asiagazetteer -f /usr/share/postgresql/9.0/contrib/pg_trgm.sql psql -U postgres -d asiagazetteer -f /usr/share/postgresql/9.0/contrib/_int.sql psql -U postgres -d asiagazetteer -f /usr/share/postgresql/9.0/contrib/postgis-1.5/postgis.sql psql -U postgres -d asiagazetteer -f /usr/share/postgresql/9.0/contrib/postgis-1.5/spatial_ref_sys.sql psql -U postgres -d asiagazetteer -f /usr/share/postgresql/9.0/contrib/hstore.sql psql -U postgres -d asiagazetteer -c 'create function execute(text) returns void as $BODY$BEGIN execute $1; END;$BODY$ language plpgsql;' psql -U postgres -d asiagazetteer -c 'select execute('"'"'ALTER TABLE '"'"' || tablename || '"'"' OWNER TO gis;'"'"') from pg_tables where schemaname = '"'"'public'"'"';' nohup time osm2pgsql -lsc -O gazetteer -C 6144 -U gis -d asiagazetteer /home/osm/planet/asia.osm.pbf > asiagazetteerplanet.txt & The last command resulted in the following output: Using projection SRS 4326 (Latlong) NOTICE: table "place" does not exist, skipping NOTICE: type "keyvalue" does not exist, skipping NOTICE: type "wordscore" does not exist, skipping NOTICE: type "stringlanguagetype" does not exist, skipping NOTICE: type "keyvaluetype" does not exist, skipping NOTICE: function get_connected_ways(pg_catalog.int4[]) does not exist, skipping Mid: pgsql, scale=10000000, cache=6144MB, maxblocks=786433*8192 Setting up table: planet_osm_nodes NOTICE: table "planet_osm_nodes" does not exist, skipping NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_nodes_pkey" for table "planet_osm_nodes" Setting up table: planet_osm_ways NOTICE: table "planet_osm_ways" does not exist, skipping NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_ways_pkey" for table "planet_osm_ways" Setting up table: planet_osm_rels NOTICE: table "planet_osm_rels" does not exist, skipping NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_rels_pkey" for table "planet_osm_rels" Reading in file: /home/osm/planet/asia.osm.pbf Processing: Node(73161k) Way(3319k) Relation(29190) parse time: 817s Node stats: total(73161946), max(1015044155) Way stats: total(3319583), max(87298623) Relation stats: total(29193), max(1298962) node cache: stored: 73161946(100.00%), storage efficiency: 15.17%, hit rate: 100.00% Stopping table: planet_osm_nodes Stopping table: planet_osm_ways Stopping table: planet_osm_rels Building index on table: planet_osm_ways Building index on table: planet_osm_rels Stopped table: planet_osm_nodes Stopped table: planet_osm_rels Stopped table: planet_osm_ways osm2pgsql SVN version 0.70.5 434.63user 4.88system 27:40.23elapsed 26%CPU (0avgtext+0avgdata 15474496maxresident)k 1429032inputs+1432outputs (74major+1003150minor)pagefaults 0swaps Afterwards, following commands have been applied (aacording to the installation instructions): cat /home/osm/bin/osm2pgsql/gazetteer/import_country_osm_grid.sql | psql -U gis asiagazetteer cat /home/osm/bin/osm2pgsql/gazetteer/import_worldboundaries.sql | psql -U gis asiagazetteer cat /home/osm/bin/osm2pgsql/gazetteer/import_country_name.sql | psql -U gis asiagazetteer cat /home/osm/bin/osm2pgsql/gazetteer/import_gb_postcode.sql | psql -U gis asiagazetteer cat /home/osm/bin/osm2pgsql/gazetteer/import_gb_postcodearea.sql | psql -U gis asiagazetteer cat /home/osm/bin/osm2pgsql/gazetteer/import_us_state.sql | psql -U gis asiagazetteer cat /home/osm/bin/osm2pgsql/gazetteer/import_us_statecounty.sql | psql -U gis asiagazetteer //this is to make the sql point to the correct gazetteer.so path sed -i 's_home/twain/osm2pgsql/gazetteer/gazetteer.so_/usr/local/lib/osm2pgsql/gazetteer.so_' /home/osm/bin/osm2pgsql/gazetteer/gazetteer-functions.sql cat /home/osm/bin/osm2pgsql/gazetteer/gazetteer-functions.sql | psql -U postgres gazetteer The last command returns: CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION ERROR: type keyvalue[] does not exist CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION ERROR: type keyvalue[] does not exist ERROR: type keyvalue[] does not exist CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION ERROR: type keyvalue[] does not exist ERROR: type keyvalue[] does not exist CREATE FUNCTION ERROR: type keyvalue[] does not exist CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION ERROR: type keyvalue[] does not exist CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION ERROR: type "place_boundingbox" does not exist ERROR: type "place_boundingbox" does not exist ERROR: type "place_boundingbox" does not exist LINE 4: result place_boundingbox; ^ ERROR: type "place_boundingbox" does not exist LINE 4: result place_boundingbox; ^ CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION CREATE FUNCTION According to the post at http://www.mail-archive.com/geocoding@openstreetmap.org/msg00112.html the osm2psql command should have created the keyvalue[] type, as otherwise, there should be an error. Alas, to me there seems to be no indication of an error during the osm2psql import step. Could there be other reasons for the "ERROR: type keyvalue[] does not exist" error? Is there maybe a problem with postgres 9.0? Something to try for further diagnosis? Any ideas? Thanks! fatzopilot -- View this message in context: http://gis.638310.n2.nabble.com/type-keyvalue-does-not-exist-error-at-Nominatim-import-tp5959979p5959979.html Sent from the Developer Discussion mailing list archive at Nabble.com. _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev