]> granicus.if.org Git - postgis/commitdiff
Add create table, add geom, drop column, drop table to batch of tortures
authorRegina Obe <lr@pcorp.us>
Sun, 14 Dec 2008 01:50:44 +0000 (01:50 +0000)
committerRegina Obe <lr@pcorp.us>
Sun, 14 Dec 2008 01:50:44 +0000 (01:50 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3396 b70326c6-7e19-0410-871a-916f4a2858ee

doc/xsl/postgis_gardentest.sql.xsl

index d28ae31a062f0266e049d7abd213e318a9f0b37b..a376e4b2a50296ec0193580b732fdaf84bc46750 100644 (file)
        </pgis:gardens>\r
 \r
        <xsl:template match='/chapter'>\r
+<!--Start Test table creation, insert, drop -->\r
+               <xsl:for-each select="document('')//pgis:gardens/pgis:gset">\r
+SELECT 'create,insert,drop Test: Start Testing Multi/<xsl:value-of select="@GeometryType" />'; \r
+BEGIN;\r
+       CREATE TABLE pgis_garden (gid serial);\r
+       SELECT AddGeometryColumn('pgis_garden','the_geom',ST_SRID(the_geom),GeometryType(the_geom),ST_CoordDim(the_geom))\r
+                       FROM (<xsl:value-of select="." />) As foo limit 1;\r
+       SELECT AddGeometryColumn('pgis_garden','the_geom_multi',ST_SRID(the_geom),GeometryType(ST_Multi(the_geom)),ST_CoordDim(the_geom))\r
+                       FROM (<xsl:value-of select="." />) As foo limit 1;\r
+       INSERT INTO pgis_garden(the_geom, the_geom_multi)\r
+       SELECT the_geom, ST_Multi(the_geom)\r
+       FROM (<xsl:value-of select="." />) As foo;\r
+       \r
+       SELECT DropGeometryColumn ('pgis_garden','the_geom');\r
+       SELECT DropGeometryTable ('pgis_garden');\r
+COMMIT;\r
+SELECT 'create,insert,drop Test: Start Testing Multi/<xsl:value-of select="@GeometryType" />'; \r
+       <xsl:text>\r
+       \r
+       </xsl:text>\r
+               </xsl:for-each>\r
+<!--End Test table creation, insert, drop -->\r
                <xsl:for-each select='sect1/refentry'>\r
                <xsl:sort select="@id"/>\r
 <!-- For each function prototype generate a test sql statement\r
@@ -47,8 +69,7 @@ SELECT  <xsl:value-of select="funcdef/function" />();
 COMMIT;\r
 SELECT  'Ending <xsl:value-of select="funcdef/function" />()';\r
 </xsl:if>\r
-<!--Start Test aggregate and unary functions \r
- DONE: Make this section less verbose -->\r
+<!--Start Test aggregate and unary functions -->\r
 <!--Garden Aggregator/Unary function with input gsets test -->\r
 <xsl:if test="contains(paramdef/type,'geometry set') or (count(paramdef/parameter) = 1 and contains(paramdef/type, 'geometry'))">\r
        <xsl:variable name='fnname'><xsl:value-of select="funcdef/function"/></xsl:variable>\r