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

Re: like/ilike improvements

From: Andrew - Supernews <andrew+nonews(at)supernews(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: like/ilike improvements
Date: 2007-05-22 17:40:36
Message-ID: slrnf56aok.2v2f.andrew+nonews@atlantis.supernews.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On 2007-05-22, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> If "%" advances by bytes then this will find a spurious match.  The
> only thing that prevents it is if "B" can't be both a leading and a
> trailing byte of validly-encoded MB characters.

Which is (by design) true in UTF8, but is not true of most other
multibyte charsets.

The %_ case is also trivially handled in UTF8 by simply ensuring that
_ doesn't match a non-initial octet. This allows % to advance by bytes
without danger of losing sync.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services

In response to

Responses

pgsql-hackers by date

Next:From: markDate: 2007-05-22 18:44:25
Subject: Re: like/ilike improvements
Previous:From: Guillaume SmetDate: 2007-05-22 17:38:48
Subject: Re: like/ilike improvements

pgsql-patches by date

Next:From: markDate: 2007-05-22 18:44:25
Subject: Re: like/ilike improvements
Previous:From: Guillaume SmetDate: 2007-05-22 17:38:48
Subject: Re: like/ilike improvements

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