Am 14.10.2010 15:56, schrieb Richard Mann:
You can also test for the presence of "name:de" in "name", rather than
just equality, so that if name contains (say) French/German/Flemish
components, then you use that rather than making your own name
(name:de) combination.

That would be:

SELECT name AS local_name,
       CASE WHEN NOT name ~* (tags->'name:en')
            THEN name || ' (' || (tags->'name:en') ||')'
            ELSE name
        END AS display_name
  FROM planet_point
 WHERE tags @> '"place"=>"country"'
   AND NOT name IS NULL
 LIMIT 10;

I'ts so simple.

Peter

_______________________________________________
Tagging mailing list
Tagging@openstreetmap.org
http://lists.openstreetmap.org/listinfo/tagging

Reply via email to