Re: add function argument name to substring and substr - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: add function argument name to substring and substr
Date
Msg-id d4a5d8fd-cb3a-4615-a44e-b45a5557d350@dunslane.net
Whole thread Raw
In response to Re: add function argument name to substring and substr  (jian he <jian.universality@gmail.com>)
Responses Re: add function argument name to substring and substr
Re: add function argument name to substring and substr
List pgsql-hackers
On 2025-10-13 Mo 10:22 AM, jian he wrote:
> On Mon, Jul 21, 2025 at 2:31 PM jian he <jian.universality@gmail.com> wrote:
>> actually,
>> section (9.7.3.)
>> https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-POSIX-REGEXP
>> already have example, like:
>> substring('foobar' from 'o(.)b')
>>
>> new patch attached, split substr, substring to make review more easier.
>> v6-0001: add function argument name to function substr
>> v6-0002: add function argument name to function substring
>>
>> v6-0002 incorporated some of the changes in v5-0002-v3-delta.patch.
>> some of the changes in v5-0002-v3-delta.patch are not related to this thread,
>> so I didn't incorporate them, right now.
> hi.
>
> rebased.



I'm late to the party on this, but I wonder if it wouldn't be better to 
use a type-neutral parameter name here, like "source", which could cover 
all these cases, instead of "string", "bytes", etc.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




pgsql-hackers by date:

Previous
From: Nazir Bilal Yavuz
Date:
Subject: Re: Build failure with Meson >= 1.8.3 on Windows
Next
From: "suyu.cmj"
Date:
Subject: Re: Question about InvalidatePossiblyObsoleteSlot()