BUG #15285: Query used index over field with ICU collation in somecases wrongly return 0 rows
От | PG Bug reporting form |
---|---|
Тема | BUG #15285: Query used index over field with ICU collation in somecases wrongly return 0 rows |
Дата | |
Msg-id | 153201618542.1404.3611626898935613264@wrigleys.postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #15285: Query used index over field with ICU collation insome cases wrongly return 0 rows
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 15285 Logged by: Roman Lytovchenko Email address: roman.lytovchenko@gmail.com PostgreSQL version: 10.4 Operating system: fedora Description: How to reproduce: CREATE COLLATION digitslast (provider = icu, locale = 'en@colReorder=latn-digit'); CREATE TABLE t (b CHAR(4) NOT NULL COLLATE digitslast); insert into t select '0000' from generate_series (0, 1000) as f(x); insert into t select '0001' from generate_series (0, 1000) as f(x); insert into t select 'ABCD' from generate_series (0, 1000) as f(x); create index i on t(b); select * from t where b = '0000' ; -- 0 rows, and this is a bug explain analyze select * from t where b = '0000' ; Index Only Scan using i on t (cost=0.28..41.80 rows=1001 width=5) (actual time=0.045..0.045 rows=0 loops=1) Index Cond: (b = '0000'::bpchar) Heap Fetches: 0 Planning time: 0.146 ms Execution time: 0.080 ms drop index i; select * from t where b = '0000' ; -- 1001 rows So, select version(); PostgreSQL 10.4 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20), 64-bit $cat /proc/version Linux version 3.10.0-514.10.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Fri Mar 3 00:04:05 UTC 2017
В списке pgsql-bugs по дате отправления: