2011/6/22 Peter Körner <osm-li...@mazdermind.de>:
>> (CASE WHEN "name:en" IS NOT NULL THEN "name:en" ELSE name END) AS name
>
> Simpler:
>
> COALESCE("name:en", "name")
>
>
> COALESCE selects the first none-null value from a chain.


thank you for this Peter. Can anyone tell how much this influences the
speed? Is it noticably slower to check a list like COALESCE("name:en",
"name:it", "name:de", "int_name", "name") compared to a simple name
select? Do I suppose correctly that COALESCE is faster for multiple
keys then nested CASE WHENs ? And what about regex-s (e.g. check for
non-latin characters and only use in these cases a different name) and
selection speed?

Cheers,
Martin

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

Reply via email to