]> 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:30 +0000 (17:35 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 May 2010 17:35:30 +0000 (17:35 +0000)
commitb7d7df63c876df13e66e72618793a206ed4776c4
tree708a6ee243921a9aa94cd62ae6064d0274f0c584
parent813cd7cb1f229ca83bb9535807e917fc326d92f1
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