aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/like_match.c
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2008-09-27 16:53:54 +0000
committerAndrew Dunstan <andrew@dunslane.net>2008-09-27 16:53:54 +0000
commitbc965e840ad9d0070c54cb174b4fc51d37dc5982 (patch)
tree50a7c204d39ad9a15b6d391cd3be44f0ab709a69 /src/backend/utils/adt/like_match.c
parentb1e929f2954fe221f89cdcb605e3a72cb5bd7c31 (diff)
downloadpostgresql-bc965e840ad9d0070c54cb174b4fc51d37dc5982.tar.gz
postgresql-bc965e840ad9d0070c54cb174b4fc51d37dc5982.zip
Compare escaped chars case insensitively for ILIKE - per gripe from TGL.
Diffstat (limited to 'src/backend/utils/adt/like_match.c')
-rw-r--r--src/backend/utils/adt/like_match.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/like_match.c b/src/backend/utils/adt/like_match.c
index 0f521bc91f4..254cfa9fec6 100644
--- a/src/backend/utils/adt/like_match.c
+++ b/src/backend/utils/adt/like_match.c
@@ -19,7 +19,7 @@
* Copyright (c) 1996-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/like_match.c,v 1.22 2008/09/26 02:16:40 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/like_match.c,v 1.23 2008/09/27 16:53:54 adunstan Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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 == '%')