[HACKERS] [PATCH] Add citext_pattern_ops to citext contrib module
От | Alexey Chernyshov |
---|---|
Тема | [HACKERS] [PATCH] Add citext_pattern_ops to citext contrib module |
Дата | |
Msg-id | d868ae6c-501c-a17c-c01b-f531d646172d@postgrespro.ru обсуждение исходный текст |
Ответы |
Re: [HACKERS] [PATCH] Add citext_pattern_ops to citext contrib module
Re: [HACKERS] [PATCH] Add citext_pattern_ops to citext contrib module |
Список | pgsql-hackers |
Hi all, The attached patch introduces citext_pattern_ops for citext extension type like text_pattern_ops for text type. Here are operators ~<~, ~<=~, ~>~, ~>=~ combined into citext_pattern_ops operator class. These operators simply compare underlying citext values as C strings with memcmp() function. This operator class isn’t supported by B-Tree index yet, but it is a first step to do it. Patch includes regression tests and is applicable to the latest commit (c85ec643ff2586e2d144374f51f93bfa215088a2). The problem of citext support for LIKE operator with B-Tree index was mentioned in [1]. Briefly, the planner doesn’t use B-Tree index for queries text_col LIKE ‘abc%’. I’d like to investigate how to improve it and make another patch. I think the start point is match_special_index_operator() function which doesn’t support custom types. I would appreciate hearing your opinion on this. 1. https://www.postgresql.org/message-id/3924.1480351187%40sss.pgh.pa.us -- Alexey Chernyshov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Вложения
В списке pgsql-hackers по дате отправления: