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

Re: like/ilike improvements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: like/ilike improvements
Date: 2007-05-22 16:12:51
Message-ID: 14164.1179850371@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> ... It turns out (according to the analysis) that the 
> only time we actually need to use NextChar is when we are matching an 
> "_" in a like/ilike pattern.

I thought we'd determined that advancing bytewise for "%" was also risky,
in two cases:

1. Multibyte character set that is not UTF8 (more specifically, does not
have a guarantee that first bytes and not-first bytes are distinct)

2. "_" immediately follows the "%".

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-05-22 16:30:37
Subject: Re: like/ilike improvements
Previous:From: Andrew DunstanDate: 2007-05-22 15:58:33
Subject: like/ilike improvements

pgsql-patches by date

Next:From: Andrew DunstanDate: 2007-05-22 16:30:37
Subject: Re: like/ilike improvements
Previous:From: Andrew DunstanDate: 2007-05-22 15:58:33
Subject: like/ilike improvements

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