Re: text_pattern_ops and complex regexps

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: text_pattern_ops and complex regexps
Дата
Msg-id 20090506150449.GV8123@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: text_pattern_ops and complex regexps  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: text_pattern_ops and complex regexps  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> >   I don't see why the last case can't use the index.
>
> The planner's understanding of regexps is far weaker than yours.
>
> (In particular, I think it's set up to abandon optimization if it
> sees | anywhere.)

That's kind of what I figured from the empirical data.  My hope was that
it might be something which could be fixed.  Is this entirely the
planner's doing (eg: PG code)?  Perhaps this is misguided but I would
think that the regexp libraries might have some support for "give me all
anchored required text for this regexp" which we could then use in the
planner.  Certainly in an ideal world we wouldn't have to teach the
planner the knowledge that the regexp libraries include for this.
Thoughts?
    Thanks,
        Stephen

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: text_pattern_ops and complex regexps
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: bytea vs. pg_dump