]> granicus.if.org Git - postgis/commitdiff
Add test for (non-literal) NULL TopoElementArray
authorSandro Santilli <strk@keybit.net>
Fri, 20 Nov 2015 19:00:04 +0000 (19:00 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 20 Nov 2015 19:00:04 +0000 (19:00 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@14410 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/regress/topoelementarray_agg.sql
topology/test/regress/topoelementarray_agg_expected

index 0eb4617d9ca3d0d625ccaefaeceadd966cf9f578..7845f197c1448257df1fd54ec876e92bcd7242bb 100644 (file)
@@ -1,8 +1,13 @@
 set client_min_messages to WARNING;
 
-SELECT 1,topology.TopoElementArray_agg('{1,3}'::topology.TopoElement);
+SELECT 1, topology.TopoElementArray_agg('{1,3}'::topology.TopoElement);
 
 SELECT 2, topology.TopoElementArray_agg(e) from (
- select '{4,1}'::topology.TopoElement as e union
- select '{5,2}'
-) as foo;
+  VALUES ('{4,1}'::TopoElement),
+         ('{5,2}')
+) as foo(e);
+
+-- See https://trac.osgeo.org/postgis/ticket/3372
+SELECT 3, topology.TopoElementArray_agg(e) from (
+  SELECT '{4,1}'::TopoElement WHERE false
+) as foo(e);
index 1cb2ef41fe511c14ae60a023b168cc355d095240..d0d2111fe309adb67996b11c6bb8a85a19fddf8c 100644 (file)
@@ -1,2 +1,3 @@
 1|{{1,3}}
 2|{{4,1},{5,2}}
+3|