Hi All,<div><br></div><div>I ran into this error when I was trying the version 0.80.0 of osm2pgsql:</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">PREPARE rel_changed_mark(int4) AS UPDATE planet_osm_rels SET pending = true WHERE parts && ARRAY[$1] AND parts[rel_off+1:array_length(parts,1)] && ARRAY[$1] AND NOT pending;</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1"> failed: ERROR:  function array_length(integer[], integer) does not exist</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">LINE 3: ...true WHERE parts && ARRAY[$1] AND parts[rel_off+1:array_leng...</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">                                                             ^</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">HINT:  No function matches the given name and argument types. You might need to add explicit type casts.</font></div>
</div><div><br></div><div>Where could that array_length function be found? What do I miss?</div><div><br></div><div>Environment: </div><div>Debian(lenny)</div><div>PostgreSQL 8.3 (without applying contrib/_int.sql as osm2pgsql states that this version doesn't need the intarray module)</div>
<div><br></div><div>Full output:</div><div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">twain@OSM-Server:~$ ./osm2pgsql/osm2pgsql -lsc -O gazetteer -C 4096 -d gazetteer italy.osm.bz2</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">osm2pgsql SVN version 0.80.0 (32bit id space)</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1"><br>
</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">Using projection SRS 4326 (Latlong)</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  table "place" does not exist, skipping</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  type "keyvalue" does not exist, skipping</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  type "wordscore" does not exist, skipping</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  type "stringlanguagetype" does not exist, skipping</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  type "keyvaluetype" does not exist, skipping</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  function get_connected_ways(pg_catalog.int4[]) does not exist, skipping</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">Mid: pgsql, scale=10000000, cache=4096MB, maxblocks=524289*8192</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">Setting up table: planet_osm_nodes</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  table "planet_osm_nodes" does not exist, skipping</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_nodes_pkey" for table "planet_osm_nodes"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">Setting up table: planet_osm_ways</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  table "planet_osm_ways" does not exist, skipping</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_ways_pkey" for table "planet_osm_ways"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">Setting up table: planet_osm_rels</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  table "planet_osm_rels" does not exist, skipping</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "planet_osm_rels_pkey" for table "planet_osm_rels"</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">PREPARE node_changed_mark(int4) AS UPDATE planet_osm_rels SET pending = true WHERE parts && ARRAY[$1] AND parts[1:way_off] && ARRAY[$1] AND NOT pending;</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">PREPARE way_changed_mark(int4) AS UPDATE planet_osm_rels SET pending = true WHERE parts && ARRAY[$1] AND parts[way_off+1:rel_off] && ARRAY[$1] AND NOT pending;</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">PREPARE rel_changed_mark(int4) AS UPDATE planet_osm_rels SET pending = true WHERE parts && ARRAY[$1] AND parts[rel_off+1:array_length(parts,1)] && ARRAY[$1] AND NOT pending;</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1"> failed: ERROR:  function array_length(integer[], integer) does not exist</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">LINE 3: ...true WHERE parts && ARRAY[$1] AND parts[rel_off+1:array_leng...</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1">                                                             ^</font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">HINT:  No function matches the given name and argument types. You might need to add explicit type casts.</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace" size="1"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace" size="1">Error occurred, cleaning up</font></div>
</div><div><br></div><div>Regards,</div><div>Gergo</div><div><br></div><div><br></div>