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

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 3d8fd757326a4f5817069b07c5b1708282b02a30
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2008-09-26T02:16:40Z
Releases: 8.4.0
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.

Files

PathChange+/−
src/backend/utils/adt/like_match.c modified +14 −9