Adrian, I had this occur once with a schema that I had updated between versions of postgis. I never did entirely get to the bottom of it - I ended up adding ::text in a similar way to what Sandro suggested. i.e.:
existing.geometry::text != NEW.geometry::text It was a crude hack (and probably hurt performance) and didn't seem to be needed the result of the time so I never committed it. I think there were 3 places were it was needed all in the place_update function. -- Brian On 26 May 2011 14:34, Adrian Chapela <[email protected]> wrote: > > I am trying to import a daily diff and is impossible. I have tried with > util.update.php and the result is the same. > > Now I am trying to the next command. Below you coud see the output. > > osm2pgsql -as -O gazetteer -d gazetteer -U postgres -W > 20110405-20110406.osc.gz > osm2pgsql SVN version 0.70.5 > > Password: > Using projection SRS 900913 (Spherical Mercator) > Mid: pgsql, scale=100, cache=800MB, maxblocks=102401*8192 > Setting up table: planet_osm_nodes > Setting up table: planet_osm_ways > Setting up table: planet_osm_rels > > Reading in file: 20110405-20110406.osc.gz > COPY_END for place failed: ERROR: operator is not unique: geometry <> > geometry > LINE 5: OR (existing.geometry != NEW.geometry AND ST_Distance(S... > ^ > HINT: Could not choose a best candidate operator. You might need to add > explicit type casts. > QUERY: SELECT existing.osm_type IS NULL > OR existingplacex.osm_type IS NULL > OR coalesce(existing.admin_level, 100) != coalesce(NEW.admin_level, > 100) > -- OR coalesce(existing.country_code, '') != > coalesce(NEW.country_code, '') > OR (existing.geometry != NEW.geometry AND > ST_Distance(ST_Centroid(existing.geometry),ST_Centroid(NEW.geometry)) > > 0.01 AND NOT > (ST_GeometryType(existing.geometry) in > ('ST_Polygon','ST_MultiPolygon') AND ST_GeometryType(NEW.geometry) in > ('ST_Polygon','ST_MultiPolygon'))) > CONTEXT: PL/pgSQL function "place_insert" line 52 at IF > COPY place, line 1: "\N N 443853 highway bus_stop > {"(\\"name\\",\\"Neumarkt\\")"} 100 \N \N \N \N \N > \N \N \N \N SRID=900..." > > Error occurred, cleaning up > > > PostgreSQL server version is 9.0 and 8.4.7. I only want to import it to > use with nominatim but I can't... it is very extrange. I was looking for > the operator != isn't in the database.... > > Have you any idea ? > > Regards. > > _______________________________________________ > dev mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/dev _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

