Re: Possible solution for LIKE optimization

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Possible solution for LIKE optimization
Date: 2001-08-06 19:15:25
Message-ID: 24084.997125325@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Hiroshi Inoue writes:
>> I'm not familiar with non_ASCII locale.
>> Is 'ss' always guaranteed to be LIKE 's%' for example ?

> Yes. LIKE doesn't use any collation rules, since it doesn't do any
> collating.

On the other hand, LIKE *is* multibyte aware. So the hypothetical
non-locale-aware comparison operators would need to be aware of
multibyte character sets even though not aware of locale. And the
"add one" operator that we postulated for the LIKE index optimization
needs to be able to increment a multibyte character.

This seems doable, but the sort order of such a comparison function
might not be very pleasant, depending on what character set you are
using.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mlw 2001-08-06 19:29:48 Re: Re: AW: Re: OID wraparound: summary and proposal
Previous Message Tom Lane 2001-08-06 19:08:08 Re: OID wraparound: summary and proposal