Re: LIKE pattern matching

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LIKE pattern matching
Date: 2000-08-07 00:36:11
Message-ID: 3562.965608571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-08-07 00:39:01 Re: scp daemon working?
Previous Message vectro 2000-08-07 00:04:28 Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2