Re: LIKE pattern matching - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LIKE pattern matching
Date
Msg-id 3562.965608571@sss.pgh.pa.us
Whole thread Raw
In response to LIKE pattern matching  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
List pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> you would write

>   ... 'hi%there' LIKE 'hi\%there' ESCAPE '\' ...

> or of course you could specify another escape character. afaik there is
> no default explicit escape character in SQL99.

I thought the agreement was to assume default ESCAPE '\' (or really
ESCAPE '\\', unless you are proposing to break ALL Postgres applications
rather than just all the ones that use LIKE?).

Two points here:

1. I do not think it's acceptable to drop the backslash-quoting behavior
with no notice.

2. It's not clear to me that the SQL default of "no quote character" is
superior to having a default quote character, and therefore I'd actually
argue that we should NEVER go to 100% SQL-and-nothing-but semantics on
this point.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: scp daemon working?
Next
From: Tom Lane
Date:
Subject: LIKE gripes