]> granicus.if.org Git - postgis/commitdiff
revise to ignore OUT parameters. Also add 20 to postgis garden output table name
authorRegina Obe <lr@pcorp.us>
Sun, 26 Jun 2011 19:44:47 +0000 (19:44 +0000)
committerRegina Obe <lr@pcorp.us>
Sun, 26 Jun 2011 19:44:47 +0000 (19:44 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7493 b70326c6-7e19-0410-871a-916f4a2858ee

doc/xsl/postgis_gardentest.sql.xsl
doc/xsl/raster_gardentest.sql.xsl

index 40b24f0cdf24ce5b204d27e983017a77931d9e02..22371d855032199053acd1a1060968cd5a5386b8 100644 (file)
@@ -31,7 +31,7 @@
        <xsl:variable name='var_spheroid'>'SPHEROID["GRS_1980",6378137,298.257222101]'</xsl:variable>
        <xsl:variable name='var_matrix'>'FF1FF0102'</xsl:variable>
        <xsl:variable name='var_boolean'>false</xsl:variable>
-       <xsl:variable name='var_logtable'>postgis_garden_log</xsl:variable>
+       <xsl:variable name='var_logtable'>postgis_garden_log20</xsl:variable>
        <xsl:variable name='var_logupdatesql'>UPDATE <xsl:value-of select="$var_logtable" /> SET log_end = clock_timestamp() 
                FROM (SELECT logid FROM <xsl:value-of select="$var_logtable" /> ORDER BY logid DESC limit 1) As foo
                WHERE <xsl:value-of select="$var_logtable" />.logid = foo.logid  AND <xsl:value-of select="$var_logtable" />.log_end IS NULL;</xsl:variable>
@@ -579,6 +579,8 @@ SELECT '<xsl:value-of select="$fnname" /><xsl:text> </xsl:text><xsl:value-of sel
                <xsl:for-each select="$func">
                        <xsl:for-each select="paramdef">
                                <xsl:choose>
+                                   <!-- ignore output parameters -->
+                                   <xsl:when test="contains(parameter,'OUT')"></xsl:when>
                                        <xsl:when test="contains(parameter, 'buffer_style_parameters') or contains(parameter, 'buffer_style_parameters')">
                                                <xsl:value-of select="$var_buffer_style" />
                                        </xsl:when>
@@ -667,7 +669,8 @@ SELECT '<xsl:value-of select="$fnname" /><xsl:text> </xsl:text><xsl:value-of sel
                                                <xsl:value-of select="$var_boolean" />
                                        </xsl:when>
                                </xsl:choose>
-                               <xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if>
+                               <!-- put a comma before an arg if it is not the first argument in a function and it is not an OUT parameter nor does it precede an OUT parameter -->
+                               <xsl:if test="position()&lt;last() and not(contains(parameter,'OUT')) and not(contains(following-sibling::paramdef[1],'OUT'))"><xsl:text>, </xsl:text></xsl:if>
                        </xsl:for-each>
                </xsl:for-each>
        </xsl:template>
index ffd3da958d5f16ae4727a153441b7c1e8617fb53..614d7012747d206911f98bb359d2a54b758c4c74 100644 (file)
@@ -359,6 +359,8 @@ SELECT '<xsl:value-of select="$fnname" /><xsl:text> </xsl:text><xsl:value-of sel
                <xsl:for-each select="$func">
                        <xsl:for-each select="paramdef">
                                <xsl:choose>
+                                    <!-- ignore output parameters -->
+                                   <xsl:when test="contains(parameter,'OUT')"></xsl:when>
                                        <xsl:when test="contains(parameter, 'georefcoords')">
                                                <xsl:value-of select="$var_georefcoords" />
                                        </xsl:when>
@@ -451,7 +453,8 @@ SELECT '<xsl:value-of select="$fnname" /><xsl:text> </xsl:text><xsl:value-of sel
                                                <xsl:value-of select="$var_boolean" />
                                        </xsl:when>
                                </xsl:choose>
-                               <xsl:if test="position()&lt;last()"><xsl:text>, </xsl:text></xsl:if>
+                               <!-- put a comma before an arg if it is not the first argument in a function and it is not an OUT parameter nor does it precede an OUT parameter -->
+                               <xsl:if test="position()&lt;last() and not(contains(parameter,'OUT')) and not(contains(following-sibling::paramdef[1],'OUT'))"><xsl:text>, </xsl:text></xsl:if>
                        </xsl:for-each>
                </xsl:for-each>
        </xsl:template>