Thread: pgsql: Make LIKE throw an error if the escape character is at the end of

pgsql: Make LIKE throw an error if the escape character is at the end of

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Make LIKE throw an error if the escape character is at the end of the pattern
(ie, has nothing to quote), rather than silently ignoring the character as has
been our historical behavior.  This is required by SQL spec and should help
reduce the sort of user confusion seen in bug #4436.  Per discussion.

This is not so much a bug fix as a definitional change, and it could break
existing applications; so not back-patched.  It might deserve being mentioned
as an incompatibility in the 8.4 release notes.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        like_match.c (r1.21 -> r1.22)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/like_match.c?r1=1.21&r2=1.22)