]> granicus.if.org Git - postgresql/commit
Rewrite LIKE's %-followed-by-_ optimization so it really works (this time
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 May 2010 17:35:23 +0000 (17:35 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 May 2010 17:35:23 +0000 (17:35 +0000)
commitdbde97cdde4afbd0a175880446e301f1bfb8994c
tree970af6c95b742d1e7efe063a4280ca5375095462
parente54b0cba96683ae9a33458a9cbd5ea53c479754d
Rewrite LIKE's %-followed-by-_ optimization so it really works (this time
for sure ;-)).  It now also optimizes more cases, such as %_%_.  Improve
comments too.  Per bug #5478.

In passing, also rename the TCHAR macro to GETCHAR, because pgindent is
messing with the formatting of the former (apparently it now thinks TCHAR
is a typedef name).

Back-patch to 8.3, where the bug was introduced.
src/backend/utils/adt/like_match.c
src/test/regress/expected/strings.out
src/test/regress/sql/strings.sql