Re: change regexp_substr first argument make tests more easier to understand.

Поиск
Список
Период
Сортировка
От jian he
Тема Re: change regexp_substr first argument make tests more easier to understand.
Дата
Msg-id CACJufxFFfd057tTSEN=-Sq4K-NYVDDkkgp6EfQ+CeuyKRYAPqA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: change regexp_substr first argument make tests more easier to understand.  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
On Fri, Jul 19, 2024 at 5:49 AM Tomas Vondra
<tomas.vondra@enterprisedb.com> 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 bit weaker. I mean, what if the function returns the
> wrong substring? How would we know?
>

this is for understanding the test.
personally, sometimes, I feel the documentation is too dry, hard to follow.
so i can based on regress tests better understand the documentation.
that was my intention for the changes.


we have more sophisticated regex test at
https://git.postgresql.org/cgit/postgresql.git/tree/src/test/modules/test_regex

> Also, if we tweak this, shouldn't we tweak also the regext_instr() calls
> a bit earlier in the test script?
>
sure.
please check attached.

Вложения

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

Предыдущее
От: Matthias van de Meent
Дата:
Сообщение: Re: DRAFT: Pass sk_attno to consistent function
Следующее
От: Noah Misch
Дата:
Сообщение: Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)