| От | Tom Lane |
|---|---|
| Тема | Re: Our regex vs. POSIX on "longest match" |
| Дата | |
| Msg-id | 8837.1330979413@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Our regex vs. POSIX on "longest match" (Martijn van Oosterhout <kleptog@svana.org>) |
| Список | pgsql-hackers |
Martijn van Oosterhout <kleptog@svana.org> writes:
> On the otherhand, I think requiring an "overall longest match" makes
> your implementation non-polynomial complexity.
Only if you don't know how to implement it -- a DFA-based implementation
doesn't have much trouble with this.
> [ equivalence of knapsack problem to regexes with bounded repetition ]
Interesting, but note that neither the POSIX spec nor our implementation
permit arbitrarily large repetition counts, so the theoretical
NP-completeness is only theoretical.
> The question is, what are users expecting of the PostgreSQL regex
> implementation?
I think a minimum expectation is that we adhere to the POSIX
specification.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера