Re: BUG #16835: btree index does not work for where clause using 'foo%' - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16835: btree index does not work for where clause using 'foo%'
Date
Msg-id 1165678.1611333843@sss.pgh.pa.us
Whole thread Raw
In response to BUG #16835: btree index does not work for where clause using 'foo%'  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'  ("Zhang, Hongyan" <ZhangH3@aetna.com>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16835: btree index does not work for where clause using 'foo%'
Next
From: Alex F
Date:
Subject: Re: BUG #16833: postgresql 13.1 process crash every hour