Tom Lane wrote:
I think it's just a bug in 8.3.
Well, here's a patch that I think fixes it. If you're happy I'll apply it to HEAD and 8.3.
cheers andrew
? .deps Index: like_match.c =================================================================== RCS file: /cvsroot/pgsql/src/backend/utils/adt/like_match.c,v retrieving revision 1.21 diff -c -r1.21 like_match.c *** like_match.c 1 Mar 2008 03:26:34 -0000 1.21 --- like_match.c 26 Sep 2008 22:38:26 -0000 *************** *** 96,105 **** { if (*p == '\\') { ! /* Next byte must match literally, whatever it is */ NextByte(p, plen); ! if ((plen <= 0) || *p != *t) return LIKE_FALSE; } else if (*p == '%') { --- 96,108 ---- { if (*p == '\\') { ! /* Next char must match literally, whatever it is */ NextByte(p, plen); ! if ((plen <= 0) || TCHAR(*p) != TCHAR(*t)) return LIKE_FALSE; + NextChar(t,tlen); + NextChar(p,plen); + continue; } else if (*p == '%') {
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers