replacing exceptions with notices; returning nulls
This commit is contained in:
parent
4892f73bab
commit
255d13cc77
@ -192,7 +192,8 @@ BEGIN
|
|||||||
|
|
||||||
IF geom_table_name IS NULL
|
IF geom_table_name IS NULL
|
||||||
THEN
|
THEN
|
||||||
RAISE EXCEPTION 'Point % is outside of the data region', geom;
|
RAISE NOTICE 'Point % is outside of the data region', geom;
|
||||||
|
RETURN QUERY SELECT '{}'::text[], '{}'::numeric[];
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
data_table_info := OBS_GetColumnData(geometry_level,
|
data_table_info := OBS_GetColumnData(geometry_level,
|
||||||
@ -503,7 +504,7 @@ CREATE OR REPLACE FUNCTION OBS_GetCategories(
|
|||||||
geometry_level text DEFAULT '"us.census.tiger".census_tract',
|
geometry_level text DEFAULT '"us.census.tiger".census_tract',
|
||||||
time_span text DEFAULT '2009 - 2013'
|
time_span text DEFAULT '2009 - 2013'
|
||||||
)
|
)
|
||||||
returns TABLE(names text[], categories text[]) as $$
|
RETURNS TABLE(names text[], categories text[]) as $$
|
||||||
DECLARE
|
DECLARE
|
||||||
geom_table_name text;
|
geom_table_name text;
|
||||||
geoid text;
|
geoid text;
|
||||||
@ -516,7 +517,8 @@ BEGIN
|
|||||||
geom_table_name := OBS_GeomTable(geom, geometry_level);
|
geom_table_name := OBS_GeomTable(geom, geometry_level);
|
||||||
IF geom_table_name IS NULL
|
IF geom_table_name IS NULL
|
||||||
THEN
|
THEN
|
||||||
RAISE EXCEPTION 'Point % is outside of the data region', geom;
|
RAISE NOTICE 'Point % is outside of the data region', geom;
|
||||||
|
RETURNS QUERY SELECT '{}'::text[], '{}'::text[];
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
data_table_info := OBS_GetColumnData(geometry_level,
|
data_table_info := OBS_GetColumnData(geometry_level,
|
||||||
|
Loading…
Reference in New Issue
Block a user