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 aad02d27e3f3602298cc572c976043d9ac120766..ad78216eb30146156ea5fc4a9d08f8aa5167c3a9 100644 (file)
@@ -103,7 +103,7 @@ MatchText(char *t, int tlen, char *p, int plen)
                                ereport(ERROR,
                                                (errcode(ERRCODE_INVALID_ESCAPE_SEQUENCE),
                                                 errmsg("LIKE pattern must not end with escape character")));
-                       if (*p != *t)
+                       if (TCHAR(*p) != TCHAR(*t))
                                return LIKE_FALSE;
                }
                else if (*p == '%')