Make LIKE throw an error if the escape character is at the end of the pattern
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Sep 2008 02:16:40 +0000 (02:16 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Sep 2008 02:16:40 +0000 (02:16 +0000)
commitbc4842319550f66f7344294ae9e6447aadfc93d6
treefc5625f684ece25c84d367ab3d101ac6f8f1b342
parentfeffbe52bed6b5df5f34b22cbaa9b553d196b1c7
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.
src/backend/utils/adt/like_match.c