Removed useless NULLIF calls (#1214)

`NULLIF(wikipedia, '') IS NOT NULL` replaced by `wikipedia <> ''`
https://stackoverflow.com/questions/23766084/best-way-to-check-for-empty-or-null-value
This commit is contained in:
Jaroslav Hanslík
2021-09-20 11:19:24 +02:00
committed by GitHub
parent e8a3bc18c5
commit d49f524edd
4 changed files with 14 additions and 14 deletions

View File

@@ -36,12 +36,12 @@ $$
SELECT osm_id,
geometry,
CASE
WHEN NULLIF(highway, '') IS NOT NULL OR NULLIF(public_transport, '') IS NOT NULL
WHEN highway <> '' OR public_transport <> ''
THEN highway_class(highway, public_transport, construction)
WHEN NULLIF(railway, '') IS NOT NULL THEN railway_class(railway)
WHEN NULLIF(aerialway, '') IS NOT NULL THEN 'aerialway'
WHEN NULLIF(shipway, '') IS NOT NULL THEN shipway
WHEN NULLIF(man_made, '') IS NOT NULL THEN man_made
WHEN railway <> '' THEN railway_class(railway)
WHEN aerialway <> '' THEN 'aerialway'
WHEN shipway <> '' THEN shipway
WHEN man_made <> '' THEN man_made
END AS class,
CASE
WHEN railway IS NOT NULL THEN railway