Re: regexp_matches and regexp_split are inconsistent
От
Pavel Stehule
Тема
Re: regexp_matches and regexp_split are inconsistent
Дата
Msg-id
162867790708102244q667d682ak5b37ac03c20b78d7@mail.gmail.com
Ответ на
Список
Дерево обсуждения
regexp_matches and regexp_split are inconsistent Tom Lane <tgl@sss.pgh.pa.us>
Re: regexp_matches and regexp_split are inconsistent "Pavel Stehule" <pavel.stehule@gmail.com>
Re: regexp_matches and regexp_split are inconsistent Stephan Szabo <sszabo@megazone.bigpanda.com>
Re: regexp_matches and regexp_split are inconsistent Tom Lane <tgl@sss.pgh.pa.us>
> > If you count carefully, you will see that regexp_matches() reports a > match of the pattern at the start of the string and at the end of the > string, and also just before 'c' (after the match to the single space). > However, regexp_split() disregards these "degenerate" matches of the > same pattern. > > Is this what we want? Arguably regexp_split is doing the most > reasonable thing for its intended usage, but the strict definition of > regexp matching seems to require what regexp_matches does. I think > we need to either change one function to match the other, or else > document the inconsistency. > Regexp_matches behave is correct, but less usable. I thing space from virtual begin to first char and from last char to virtual end can be eliminated. Regards Pavel Stehule
В списке pgsql-hackers по дате отправления