should use coaelesce, not nullif

This commit is contained in:
John Krauss 2016-07-11 13:57:29 -04:00
parent 26ee8aedb1
commit fe6343c73f

View File

@ -404,7 +404,7 @@ BEGIN
AND (numer_timespan = %L OR (%L = '''')) AND (numer_timespan = %L OR (%L = ''''))
ORDER BY numer_timespan DESC ORDER BY numer_timespan DESC
LIMIT 1 ', LIMIT 1 ',
boundary_id, measure_id, nullif(time_span, ''), nullif(time_span, '')) boundary_id, measure_id, coalesce(time_span, ''), coalesce(time_span, ''))
INTO colname, data_geoid_colname, target_table; INTO colname, data_geoid_colname, target_table;