| From: | adunstan(at)postgresql(dot)org (Andrew Dunstan) |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Improve efficiency of LIKE/ILIKE code, especially for multi-byte |
| Date: | 2007-06-02 02:03:42 |
| Message-ID: | 20070602020342.799769FC36E@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Log Message:
-----------
Improve efficiency of LIKE/ILIKE code, especially for multi-byte charsets,
and most especially for UTF8. Remove unnecessary special cases for bytea
processing and single-byte charset ILIKE. a ILIKE b is now processed as
lower(a) LIKE lower(b) in all cases. The code is now considerably simpler. All
comparisons are now performed byte-wise, and the text and pattern are also
advanced byte-wise where it is safe to do so - essentially where a wildcard is
not being matched.
Andrew Dunstan, from an original patch by ITAGAKI Takahiro, with ideas from
Tom Lane and Mark Mielke.
Modified Files:
--------------
pgsql/src/backend/utils/adt:
like.c (r1.68 -> r1.69)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like.c.diff?r1=1.68&r2=1.69)
like_match.c (r1.15 -> r1.16)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like_match.c.diff?r1=1.15&r2=1.16)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2007-06-02 02:46:38 | pgsql: TODO item not needed anymore now that the buffer cache is |
| Previous Message | Tom Lane | 2007-06-01 23:43:39 | pgsql: Fix aboriginal bug in BufFileDumpBuffer that would cause it to |