Re: Partial index with regexp not working

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Partial index with regexp not working
Дата
Msg-id 27812.1189520197@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Partial index with regexp not working  (Richard Huxton <dev@archonet.com>)
Ответы Re: Partial index with regexp not working  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
Список pgsql-general
Richard Huxton <dev@archonet.com> writes:
> The planner isn't smart enough to figure out which queries can use this
> index by examining them, it just looks for (NOT paid) in the WHERE
> clause and if it doesn't find it, ignores the index.

Well, it's a little bit brighter than that: it has some smarts about
btree-indexable comparisons and about null-testing.  For instance, it
can figure out that "x > 3" implies "x > 0", and so a query WHERE x > 3
could use a partial index WHERE x > 0.  Also, assuming that the >
operator is strict, it would recognize that WHERE x IS NOT NULL is
implied.

But there's certainly not anything in there that can make inferences
about regex matches.

            regards, tom lane

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

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Hardware recommendation: which is best
Следующее
От: Franz.Rasper@izb.de
Дата:
Сообщение: Re: [SPAM] Re: Hardware recommendation: which is best