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

Поиск
Список
Период
Сортировка
От luis.roberto@siscobra.com.br
Тема Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'
Дата
Msg-id 848323852.1456269.1611343417560.JavaMail.zimbra@siscobra.com.br
обсуждение исходный текст
Ответ на Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'  ("Zhang, Hongyan" <ZhangH3@aetna.com>)
Ответы Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'  ("Zhang, Hongyan" <ZhangH3@aetna.com>)
Список pgsql-bugs
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%'

.style1 {font-family: "Times New Roman";}

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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Zhang, Hongyan"
Дата:
Сообщение: Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'
Следующее
От: "Zhang, Hongyan"
Дата:
Сообщение: Re: [EXTERNAL] Re: BUG #16835: btree index does not work for where clause using 'foo%'