Ilia Evdokimov writes:
> Current tests with regexp_instr() and regexp_substr() with string
> 'abcabcabc' are really unreadable and you would spend time to understand
> that happens in these tests and if they are really correct. I'd better
> change them into "abcdefghi" just like in query
>
Hi everybody
Current tests with regexp_instr() and regexp_substr() with string
'abcabcabc' are really unreadable and you would spend time to understand
that happens in these tests and if they are really correct. I'd better
change them into "abcdefghi" just like in query
SELECT regexp_su
On Fri, Jul 19, 2024 at 5:49 AM Tomas Vondra
wrote:
>
> Hi,
>
> If I understand correctly, the problem is that it's not clear which of
> the 'abc' substrings is matched/returned by the function, right?
>
> I wonder if this is a problem only for understanding the test, or if it
> makes the tests a
Hi,
If I understand correctly, the problem is that it's not clear which of
the 'abc' substrings is matched/returned by the function, right?
I wonder if this is a problem only for understanding the test, or if it
makes the tests a bit weaker. I mean, what if the function returns the
wrong substrin
On Thu, Dec 28, 2023 at 12:13 AM jian he wrote:
>
> hi.
> https://git.postgresql.org/cgit/postgresql.git/tree/src/test/regress/expected/strings.out#n928
>
> SELECT regexp_substr('abcabcabc', 'a.c');
> SELECT regexp_substr('abcabcabc', 'a.c', 2);
> SELECT regexp_substr('abcabcabc', 'a.c', 1, 3);
>
hi.
https://git.postgresql.org/cgit/postgresql.git/tree/src/test/regress/expected/strings.out#n928
SELECT regexp_substr('abcabcabc', 'a.c');
SELECT regexp_substr('abcabcabc', 'a.c', 2);
SELECT regexp_substr('abcabcabc', 'a.c', 1, 3);
SELECT regexp_substr('abcabcabc', 'a.c', 1, 4) IS NULL AS t;
SEL