]> 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:36 +0000 (17:35 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 28 May 2010 17:35:36 +0000 (17:35 +0000)
commit63c0780dba39e0d25fbd4c5e7a94e9c0e9236ace
tree4bc98fd80d5610668688294001ae7fdddbc30d9e
parentcaea7b7aca53ce91ccd7d143264fd1ae31150740
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