Re: add function argument name to substring and substr

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, "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>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: add function argument name to substring and substr
Date: 2026-03-27 15:52:55
Message-ID: c8a81a18-d3e6-4386-a0ca-efc88dcce301@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31.12.25 08:47, jian he wrote:
> rebased, and rechecked it again.
>
> seems no changes to the citext extension are required, since the citext data
> type does not define specialized substring/substr function.

I don't really see the point of this. These are standardized functions,
and people should be using them in the standardized ways. By adding
parameter names, we are opening up the use of these in nonstandard and
unportable ways. I don't think the arguments of these functions are
terribly confusing that use of named parameters adds much value. At
least I didn't see this argument being made.

Furthermore, if we somehow decided to do this, let's not do it four
functions at a time but have a general plan about whether, why, and how
to add parameter names to built-in/standard functions.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2026-03-27 16:08:41 Re: [PATCH] Provide support for trailing commas
Previous Message Robert Haas 2026-03-27 15:44:15 Re: pg_plan_advice