pgsql: Fix LIKE's special-case code for % followed by _. - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix LIKE's special-case code for % followed by _.
Date
Msg-id 20090524181047.64C4E75331E@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix LIKE's special-case code for % followed by _.  I'm not entirely sure that
this case is worth a special code path, but a special code path that gets
the boundary condition wrong is definitely no good.  Per bug #4821 from
Andrew Gierth.

In passing, clean up some minor code formatting issues (excess parentheses
and blank lines in odd places).

Back-patch to 8.3, where the bug was introduced.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        like_match.c (r1.20.2.2 -> r1.20.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like_match.c?r1=1.20.2.2&r2=1.20.2.3)
    pgsql/src/test/regress/expected:
        strings.out (r1.33 -> r1.33.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/strings.out?r1=1.33&r2=1.33.2.1)
    pgsql/src/test/regress/sql:
        strings.sql (r1.22 -> r1.22.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/strings.sql?r1=1.22&r2=1.22.2.1)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix LIKE's special-case code for % followed by _.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Use more-portable coding for the check on handing out the last