Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
217ca2d84d | ||
|
|
f1bf4259bc | ||
|
|
a2609d9d07 | ||
|
|
01779991bb |
10
NEWS.md
10
NEWS.md
@@ -1,3 +1,13 @@
|
||||
1.3.5 (2017-03-15)
|
||||
|
||||
No changes. Artifact to allow for data update.
|
||||
|
||||
1.3.4 (2017-03-10)
|
||||
|
||||
__Bugfixes__
|
||||
|
||||
* Remove erroneously committed `RAISE NOTICE` in `OBS_GetData`
|
||||
|
||||
1.3.3 (2017-03-10)
|
||||
|
||||
__Bugfixes__
|
||||
|
||||
2252
release/observatory--1.3.4.sql
Normal file
2252
release/observatory--1.3.4.sql
Normal file
File diff suppressed because one or more lines are too long
2252
release/observatory--1.3.5.sql
Normal file
2252
release/observatory--1.3.5.sql
Normal file
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
comment = 'CartoDB Observatory backend extension'
|
||||
default_version = '1.3.3'
|
||||
default_version = '1.3.5'
|
||||
requires = 'postgis'
|
||||
superuser = true
|
||||
schema = cdb_observatory
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
comment = 'CartoDB Observatory backend extension'
|
||||
default_version = '1.3.3'
|
||||
default_version = '1.3.5'
|
||||
requires = 'postgis'
|
||||
superuser = true
|
||||
schema = cdb_observatory
|
||||
|
||||
@@ -769,35 +769,6 @@ BEGIN
|
||||
geomrefs_noalias, data_tables, obs_wheres, user_wheres
|
||||
USING (SELECT ARRAY(SELECT json_array_elements_text(params))::json[]), geomtype;
|
||||
|
||||
|
||||
RAISE NOTICE '%', format($query$
|
||||
WITH _raw_geoms AS (SELECT
|
||||
%L::integer as id,
|
||||
%L::geometry AS geom),
|
||||
_geoms AS (SELECT id,
|
||||
CASE WHEN (ST_NPoints(geom) > 500)
|
||||
THEN ST_CollectionExtract(ST_MakeValid(ST_SimplifyVW(geom, 0.0001)), 3)
|
||||
ELSE geom END geom
|
||||
FROM _raw_geoms),
|
||||
_procgeoms AS (SELECT _geoms.id, _geoms.geom %s %s
|
||||
FROM _geoms %s
|
||||
%s
|
||||
)
|
||||
SELECT _procgeoms.id::INT, Array_to_JSON(ARRAY[%s]::JSON[])
|
||||
FROM _procgeoms %s
|
||||
%s
|
||||
GROUP BY _procgeoms.id %s
|
||||
ORDER BY _procgeoms.id
|
||||
$query$, geomvals[1].val, geomvals[1].geom, ', ' || NullIf(geomrefs_alias, ''),
|
||||
', ' || NullIf(geom_colspecs, ''),
|
||||
', ' || NullIf(geom_tables, ''),
|
||||
'WHERE ' || NullIf( user_wheres, ''),
|
||||
data_colspecs, ', ' || NullIf(data_tables, ''),
|
||||
'WHERE ' || NULLIF(obs_wheres, ''),
|
||||
CASE WHEN merge IS False THEN ', ' || geomrefs_noalias ELSE '' END);
|
||||
|
||||
|
||||
|
||||
RETURN QUERY EXECUTE format($query$
|
||||
WITH _raw_geoms AS (%s),
|
||||
_geoms AS (SELECT id,
|
||||
|
||||
Reference in New Issue
Block a user