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

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: change regexp_substr first argument make tests more easier to understand.
Date: 2024-07-18 21:49:16
Message-ID: 839433fd-1ce7-485d-b42a-76e094781a91@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Also, if we tweak this, shouldn't we tweak also the regext_instr() calls
a bit earlier in the test script?

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-07-18 22:10:29 Re: psql: fix variable existence tab completion
Previous Message Tom Lane 2024-07-18 21:48:24 Re: add function argument names to regex* functions.