fix division by zero issue

git-svn-id: http://svn.osgeo.org/postgis/trunk@7379 b70326c6-7e19-0410-871a-916f4a2858ee
This commit is contained in:
Regina Obe 2011-06-12 06:34:18 +00:00
parent 5d14666e26
commit 289d988d01

View file

@ -79,7 +79,7 @@ BEGIN
|| ' ELSE'
|| ' ((1.0 - '
|| '(least_hn(' || coalesce(quote_literal(parsed.address || '.0'),'NULL') || ',least_hn(b.fromhn,b.tohn)::text) /'
|| ' greatest_hn(' || coalesce(quote_literal(parsed.address || '.0'),'NULL') || ',greatest_hn(b.fromhn,b.tohn)::text))'
|| ' greatest(1,greatest_hn(' || coalesce(quote_literal(parsed.address || '.0'),'NULL') || ',greatest_hn(b.fromhn,b.tohn)::text)))'
|| ') * 5)::integer + 5'
|| ' END'
|| ' as sub_rating,'