From b8910341468d491af47e4b89bcc9524616e6fb54 Mon Sep 17 00:00:00 2001 From: Antonio Date: Thu, 15 Feb 2018 11:17:50 +0100 Subject: [PATCH] Changed name of numer timespans to ensure backwards compatibility --- src/pg/sql/42_observatory_exploration.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pg/sql/42_observatory_exploration.sql b/src/pg/sql/42_observatory_exploration.sql index f7fbec4..de8bbd6 100644 --- a/src/pg/sql/42_observatory_exploration.sql +++ b/src/pg/sql/42_observatory_exploration.sql @@ -381,7 +381,7 @@ BEGIN -- '2015 - 2015' as one of the valid timespans. -- If we pass a numerator_id, we filter by that numerator CASE WHEN $1 IS NOT NULL AND $1 != '' THEN - EXISTS (SELECT 1 FROM observatory.obs_meta_geom_numer_timespan onu WHERE o.geom_id = onu.geom_id AND onu.numer_id = $1 AND ($3 = ANY(onu.numer_timespans) OR $3 IN (select(unnest(o.numer_timespans))))) + EXISTS (SELECT 1 FROM observatory.obs_meta_geom_numer_timespan onu WHERE o.geom_id = onu.geom_id AND onu.numer_id = $1 AND ($3 = ANY(onu.timespans) OR $3 IN (select(unnest(o.timespans))))) ELSE EXISTS (SELECT 1 FROM observatory.obs_meta_geom_numer_timespan onu WHERE o.geom_id = onu.geom_id AND ($3 = ANY(onu.geom_timespans) OR $3 IN (select(unnest(o.geom_timespans))))) END