[mapserver-commits] r13099 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Feb 8 15:03:13 EST 2012


Author: aboudreault
Date: 2012-02-08 12:03:13 -0800 (Wed, 08 Feb 2012)
New Revision: 13099

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapogcfilter.c
Log:
Ability to do use PropertyIsLike with a column of a different type than text (postgis) (#4176)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2012-02-08 19:39:40 UTC (rev 13098)
+++ trunk/mapserver/HISTORY.TXT	2012-02-08 20:03:13 UTC (rev 13099)
@@ -15,6 +15,8 @@
 Current Version (SVN trunk, 6.1-dev, future 6.2): 
 -------------------------------------------------
 
+- Ability to do use PropertyIsLike with a column of a different type than text (postgis) (#4176)
+
 - Fixed SLD with FILTER doesn't apply properly to database layers (#4112)
 
 - Fixed lexer buffer size issue with single quotes in a string  (#4175)

Modified: trunk/mapserver/mapogcfilter.c
===================================================================
--- trunk/mapserver/mapogcfilter.c	2012-02-08 19:39:40 UTC (rev 13098)
+++ trunk/mapserver/mapogcfilter.c	2012-02-08 20:03:13 UTC (rev 13099)
@@ -3249,11 +3249,15 @@
     msFree(pszEscapedStr);
     pszEscapedStr = NULL;
 
-    if (bCaseInsensitive == 1 && lp->connectiontype == MS_POSTGIS)
-      strlcat(szBuffer, " ilike '", bufferSize);
+    if (lp->connectiontype == MS_POSTGIS)
+    {
+	if (bCaseInsensitive == 1)
+	    strlcat(szBuffer, "::text ilike '", bufferSize);
+	else
+	    strlcat(szBuffer, "::text like '", bufferSize);
+    }
     else
-      strlcat(szBuffer, " like '", bufferSize);
-        
+      strlcat(szBuffer, " like '", bufferSize);        
    
     pszValue = psFilterNode->psRightNode->pszValue;
     nLength = strlen(pszValue);



More information about the mapserver-commits mailing list