Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group