From: | "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: regexp_matches and regexp_split are inconsistent |
Date: | 2007-08-11 05:44:26 |
Message-ID: | 162867790708102244q667d682ak5b37ac03c20b78d7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Joshua D. Drake | 2007-08-11 12:54:06 | Re: Wrote a connect-by feature |
Previous Message | Tom Lane | 2007-08-11 05:42:37 | Re: Unexpected VACUUM FULL failure |