From: Sandro Santilli <strk@keybit.net>
Date: Sat, 28 Jan 2012 07:37:01 +0000 (+0000)
Subject: Allow multiple TopoGeometry column in the same table
X-Git-Tag: 2.0.0alpha3~45
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9893b681cd41cee9feb865fc5e32f3945a86b628;p=postgis

Allow multiple TopoGeometry column in the same table

git-svn-id: http://svn.osgeo.org/postgis/trunk@8953 b70326c6-7e19-0410-871a-916f4a2858ee
---

diff --git a/topology/test/regress/addtopogeometrycolumn.sql b/topology/test/regress/addtopogeometrycolumn.sql
index 745f5d981..a6d9ade84 100644
--- a/topology/test/regress/addtopogeometrycolumn.sql
+++ b/topology/test/regress/addtopogeometrycolumn.sql
@@ -8,7 +8,10 @@ select addtopogeometrycolumn('tt','public','feature','tg','BOGUS'); -- fail
 select addtopogeometrycolumn('tt','public','feature','tg','POINT', 0); -- fail
 
 -- Expect first good call returning 1
-select 'good', addtopogeometrycolumn('tt','public','feature','tg','POINT');
+select 'T1', addtopogeometrycolumn('tt','public','feature','tg','POINT');
+
+-- Check that you can add a second topogeometry column to the same table
+select 'T2', addtopogeometrycolumn('tt','public','feature','tg2','LINE');
 
 select l.layer_id, l.schema_name, l.table_name, l.feature_column,
  l.feature_type, l.level, l.child_id 
diff --git a/topology/test/regress/addtopogeometrycolumn_expected b/topology/test/regress/addtopogeometrycolumn_expected
index e20690d11..90af18deb 100644
--- a/topology/test/regress/addtopogeometrycolumn_expected
+++ b/topology/test/regress/addtopogeometrycolumn_expected
@@ -2,6 +2,8 @@ t
 ERROR:  relation "public.feature" does not exist
 ERROR:  Layer type must be one of POINT,LINE,POLYGON,COLLECTION
 ERROR:  Child layer 0 does not exist in topology "tt"
-good|1
+T1|1
+T2|2
 1|public|feature|tg|1|0|
+2|public|feature|tg2|2|0|
 Topology 'tt' dropped