]> granicus.if.org Git - postgis/commitdiff
Do not report "face without edges" error for universal face (#1612)
authorSandro Santilli <strk@keybit.net>
Fri, 24 Feb 2012 15:23:35 +0000 (15:23 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 24 Feb 2012 15:23:35 +0000 (15:23 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9285 b70326c6-7e19-0410-871a-916f4a2858ee

topology/test/regress/legacy_validate.sql
topology/test/regress/legacy_validate_expected
topology/topology.sql.in.c

index 77d22d5b42a76cdbf314fa3143f9acf39b1b9cb9..d325e706f9d40c02b9405f4dc3cabd17353fd054 100644 (file)
@@ -5,3 +5,8 @@ set client_min_messages to WARNING;
 
 -- clean up
 SELECT topology.DropTopology('city_data');
+
+-- Test for #1612
+SELECT CreateTopology('tt') > 0;
+SELECT 'Empty topology errors', count(*) FROM ValidateTopology('tt');
+SELECT DropTopology('tt');
index 24c43935013c0d5cc23207dd0a8fd7be761fe3c9..7d163181843fb2a50cfb4cdaaa8a0f20cfbde4d5 100644 (file)
@@ -7,3 +7,6 @@ COMMIT
 Topology validation errors follow:
 End of topology validation errors
 Topology 'city_data' dropped
+t
+Empty topology errors|0
+Topology 'tt' dropped
index fcd8ec1b963c5ef31265854d1a9b0d99c64357aa..1c6edf4c0c1759b9a2d5d29a8dda4992b883d891 100644 (file)
@@ -1492,7 +1492,7 @@ BEGIN
   -- Check for faces w/out edges
   FOR rec IN EXECUTE 'SELECT face_id as id1 FROM '
     || quote_ident(toponame) || '.face '
-    || 'EXCEPT ( SELECT left_face FROM '
+    || 'WHERE face_id > 0 EXCEPT ( SELECT left_face FROM '
     || quote_ident(toponame) || '.edge '
     || ' UNION SELECT right_face FROM '
     || quote_ident(toponame) || '.edge '