From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: add function argument name to substring and substr |
Date: | 2025-10-13 15:26:46 |
Message-ID: | CACJufxH3dnnQKRuPNhUtHEUN=XkAGsPmEfMpAW5zo=3CvVbgzQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Oct 13, 2025 at 10:58 PM Andrew Dunstan <andrew(at)dunslane(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Bryan Green | 2025-10-13 15:32:37 | [PATCH] Fix incorrect fprintf usage in log_error FRONTEND path |
Previous Message | Jim Jones | 2025-10-13 15:16:33 | Re: Add notification on BEGIN ATOMIC SQL functions using temp relations |