]> granicus.if.org Git - postgresql/commitdiff
Compare escaped chars case insensitively for ILIKE - per gripe from TGL.
authorAndrew Dunstan <andrew@dunslane.net>
Sat, 27 Sep 2008 16:57:43 +0000 (16:57 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Sat, 27 Sep 2008 16:57:43 +0000 (16:57 +0000)
src/backend/utils/adt/like_match.c

index 30d52d62c4258d17dbc864fcbcd1180fd2f8e9d6..8d32cce449cc9f2f3323d0dd565aee394c55a70b 100644 (file)
@@ -19,7 +19,7 @@
  * Copyright (c) 1996-2008, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
- *     $PostgreSQL: pgsql/src/backend/utils/adt/like_match.c,v 1.20.2.1 2008/03/01 03:26:44 tgl Exp $
+ *     $PostgreSQL: pgsql/src/backend/utils/adt/like_match.c,v 1.20.2.2 2008/09/27 16:57:43 adunstan Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -98,7 +98,7 @@ MatchText(char *t, int tlen, char *p, int plen)
                {
                        /* Next byte must match literally, whatever it is */
                        NextByte(p, plen);
-                       if ((plen <= 0) || *p != *t)
+                       if ((plen <= 0) || TCHAR(*p) != TCHAR(*t))
                                return LIKE_FALSE;
                }
                else if (*p == '%')