Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v8L8f-00Gaxc-E6 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Oct 2025 16:11:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1v8L8d-006tsm-2b for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Oct 2025 16:11:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v8L8c-006tsd-PO for pgsql-hackers@lists.postgresql.org; Mon, 13 Oct 2025 16:11:07 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v8L8X-001YbE-2q for pgsql-hackers@postgresql.org; Mon, 13 Oct 2025 16:11:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 59DGAu30243366; Mon, 13 Oct 2025 12:10:56 -0400 From: Tom Lane To: Andrew Dunstan cc: jian he , "David G. Johnston" , Marcos Pegoraro , PostgreSQL-development Subject: Re: add function argument name to substring and substr In-reply-to: References: Comments: In-reply-to Andrew Dunstan message dated "Mon, 13 Oct 2025 10:58:30 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <243364.1760371856.1@sss.pgh.pa.us> Date: Mon, 13 Oct 2025 12:10:56 -0400 Message-ID: <243365.1760371856@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > 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. +1 for that idea. As Jian notes, we'd need to make the docs match, but I think that this would be an improvement across the board. Parameter names like "string" don't convey much information. regards, tom lane