On Mon, Oct 13, 2025 at 10:58 PM Andrew Dunstan <andrew@dunslane.net> wrote:
>
> 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.
>
\df *regexp*
psql output generally begins with "string text, pattern text"
that's because of commit 580f872.
in that commit, discussion,
https://www.postgresql.org/message-id/CACJufxG3NFKKsh6x4fRLv8h3V-HvN4W5dA%3DzNKMxsNcDwOKang%40mail.gmail.com,
in that first patch, i did tried to use "source" in some cases, then I found out
if you changed to "source" then all the documentation also needs to be
changed. so
I stuck to "string" in commit 580f872.
Here, for the functions substr and substring, I followed the precedent set by
the regex function using the term "string".
sure, we can change it to "source" if that's what people want.