Skip site navigation (1) Skip section navigation (2)

pgsql: Rewrite LIKE's %-followed-by-_ optimization so it really works

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rewrite LIKE's %-followed-by-_ optimization so it really works
Date: 2010-05-28 17:35:30
Message-ID: 20100528173530.C91E67541D2@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
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.

Tags:
----
REL8_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        like_match.c (r1.26 -> r1.26.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like_match.c?r1=1.26&r2=1.26.2.1)
    pgsql/src/test/regress/expected:
        strings.out (r1.38 -> r1.38.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/strings.out?r1=1.38&r2=1.38.2.1)
    pgsql/src/test/regress/sql:
        strings.sql (r1.26 -> r1.26.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/strings.sql?r1=1.26&r2=1.26.2.1)

pgsql-committers by date

Next:From: Tom LaneDate: 2010-05-28 17:35:36
Subject: pgsql: Rewrite LIKE's %-followed-by-_ optimization so it really works
Previous:From: Tom LaneDate: 2010-05-28 17:35:24
Subject: pgsql: Rewrite LIKE's %-followed-by-_ optimization so it really works

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group