From: luis.roberto@siscobra.com.br
To: Zhang, Hongyan <ZhangH3@aetna.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'
Date: Fri, 22 Jan 2021 16:23:37 -0300 (BRT)
Message-ID: <848323852.1456269.1611343417560.JavaMail.zimbra@siscobra.com.br> (raw)
In-Reply-To: <E75956AF-B8FD-49AC-A9DD-A503F26F4AA2@aetna.com>
References: <16835-419ddd12f1e74ee5@postgresql.org>
<1165678.1611333843@sss.pgh.pa.us>
<E75956AF-B8FD-49AC-A9DD-A503F26F4AA2@aetna.com>
De: "Zhang, Hongyan" <ZhangH3@aetna.com>
Para: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "pgsql-bugs" <pgsql-bugs@lists.postgresql.org>
Enviadas: Sexta-feira, 22 de janeiro de 2021 16:07:22
Assunto: Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'
Thanks, Tom.
Locale is en_US.UTF-8.
Is there plan to alter that behavior to allow index in non C locale?
According to documentation: " However, if your database does not use the C locale you will need to create the index with a special operator class to support indexing of pattern-matching queries;"
So you'll have to create the index with a specific operator class.
You can use:.
CREATE INDEX tbl_col_text_pattern_ops_idx ON tbl(col text_pattern_ops) [1]
[1] https://stackoverflow.com/questions/1566717/postgresql-like-query-performance-variations
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: luis.roberto@siscobra.com.br, ZhangH3@aetna.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
Subject: Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'
In-Reply-To: <848323852.1456269.1611343417560.JavaMail.zimbra@siscobra.com.br>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox