From fe6343c73fab039b5c2057f281acca8b3402815c Mon Sep 17 00:00:00 2001 From: John Krauss Date: Mon, 11 Jul 2016 13:57:29 -0400 Subject: [PATCH] should use coaelesce, not nullif --- src/pg/sql/41_observatory_augmentation.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pg/sql/41_observatory_augmentation.sql b/src/pg/sql/41_observatory_augmentation.sql index 01be18d..cac119d 100644 --- a/src/pg/sql/41_observatory_augmentation.sql +++ b/src/pg/sql/41_observatory_augmentation.sql @@ -404,7 +404,7 @@ BEGIN AND (numer_timespan = %L OR (%L = '''')) ORDER BY numer_timespan DESC 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;