Re: BUG #16835: btree index does not work for where clause using 'foo%'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zhangh3(at)aetna(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16835: btree index does not work for where clause using 'foo%'
Date: 2021-01-22 16:44:03
Message-ID: 1165678.1611333843@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> https://www.postgresql.org/docs/11/indexes-types.html, according to this
> page, btree index is supposed to work for where clause col like 'foo%', but
> does not work for me. we are on aurora postgres 11, I also tested on
> postgres 11, it does not work either.

As the manual explains, that will not work by default unless your
database locale is C (which is an uncommon default nowadays).

It's also possible that Aurora has changed something that keeps
it from working, but I'd investigate the locale angle first.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alex F 2021-01-22 17:21:10 Re: BUG #16833: postgresql 13.1 process crash every hour
Previous Message PG Bug reporting form 2021-01-22 15:56:52 BUG #16835: btree index does not work for where clause using 'foo%'