From: Sandro Santilli Date: Fri, 24 Feb 2012 15:23:35 +0000 (+0000) Subject: Do not report "face without edges" error for universal face (#1612) X-Git-Tag: 2.0.0beta1~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=258f0ee04ffe2a56d21ef69b1ac033c06cbddffa;p=postgis Do not report "face without edges" error for universal face (#1612) git-svn-id: http://svn.osgeo.org/postgis/trunk@9285 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/topology/test/regress/legacy_validate.sql b/topology/test/regress/legacy_validate.sql index 77d22d5b4..d325e706f 100644 --- a/topology/test/regress/legacy_validate.sql +++ b/topology/test/regress/legacy_validate.sql @@ -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'); diff --git a/topology/test/regress/legacy_validate_expected b/topology/test/regress/legacy_validate_expected index 24c439350..7d1631818 100644 --- a/topology/test/regress/legacy_validate_expected +++ b/topology/test/regress/legacy_validate_expected @@ -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 diff --git a/topology/topology.sql.in.c b/topology/topology.sql.in.c index fcd8ec1b9..1c6edf4c0 100644 --- a/topology/topology.sql.in.c +++ b/topology/topology.sql.in.c @@ -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 '