public inbox for [email protected]  
help / color / mirror / Atom feed
From: jian he <[email protected]>
To: Andrew Dunstan <[email protected]>
Cc: David G. Johnston <[email protected]>
Cc: Marcos Pegoraro <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: add function argument name to substring and substr
Date: Mon, 13 Oct 2025 23:26:46 +0800
Message-ID: <CACJufxH3dnnQKRuPNhUtHEUN=XkAGsPmEfMpAW5zo=3CvVbgzQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CACJufxHTBkymh06D4mGKNe1YfRNFN+gFBybmygWk=PtMqu00LQ@mail.gmail.com>
	<CAKFQuwYD477A9Oy2PxRr_KY8t=k=jbOUK83ie0dS7fcpBsXS3Q@mail.gmail.com>
	<CACJufxE9kt7fAz_g_6PO0PmxK=duWDx+dNUyEWHkGxmRw0EqOg@mail.gmail.com>
	<CAKFQuwZ=ZEkQaFZBRpukNn-qvk4U52ZAsrLLRPAC4hgcZsJmkQ@mail.gmail.com>
	<CACJufxFpzqdfYvsj2iWhtemRyPSB5O7_gb9vRd7cE1ZcVvmZnw@mail.gmail.com>
	<CAKFQuwa-j+oA23EVA7qk+AUdpi24d1LC_O9MH5oSnzOv2McEhg@mail.gmail.com>
	<CACJufxH0jqshH6SC97eQ7T=QcSYpbtKMR2=wmds=K2UT9t0tFw@mail.gmail.com>
	<CAKFQuwbPdo1MORJqnQj=eA6bGrvGu_U+8J+oTWw7QDvuX2oAQw@mail.gmail.com>
	<CACJufxGF6vU7KUMqHL0RehdvwVBENz2Q++ZyGJaCzk2_VVPqWQ@mail.gmail.com>
	<CAKFQuwZU=eY0F6jE4ekuPs5FMqNr2e-mJ=MTuaZTeDG+Xti1=g@mail.gmail.com>
	<CAB-JLwathhELcwARpTJ5cAh-Z6tS6V8PCXti9woGZMJiqzCPfA@mail.gmail.com>
	<CAKFQuwYSRa_Q-qpXMosT4HYx62aGjkiNA2A-d6dZhzTamHs6dw@mail.gmail.com>
	<CACJufxHbWiZLwzKs6k4+w=UjA_wDEEhWgH2fpUexxgvHOP_OWA@mail.gmail.com>
	<CACJufxHDCHsKp_8U8cQvnQpa8mPy1bJ5jjdcmjHGT9weoAT4bg@mail.gmail.com>
	<[email protected]>

On Mon, Oct 13, 2025 at 10:58 PM Andrew Dunstan <[email protected]> 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.g...,
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.





view thread (20+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: add function argument name to substring and substr
  In-Reply-To: <CACJufxH3dnnQKRuPNhUtHEUN=XkAGsPmEfMpAW5zo=3CvVbgzQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox