Re: [PATCH] Rename trim_array() for consistency with the rest of array_* functions - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: [PATCH] Rename trim_array() for consistency with the rest of array_* functions
Date
Msg-id 241c126e-4d38-428c-87b8-b9f7234aebc7@postgresfriends.org
Whole thread Raw
Responses Re: [PATCH] Rename trim_array() for consistency with the rest of array_* functions
List pgsql-hackers
On 29/10/2024 13:01, Aleksander Alekseev wrote:
> Hi hackers,
>
> Currently most of the functions dealing with arrays ( except for
> unnest() and cardinality() ) start with `array_` prefix [1] -
> array_length(), array_fill(), etc. Also this is how we name the new
> functions, e.g. recently proposed array_sort() [2] and array_reverse()
> [3]. The only exception from this rule is trim_array() which might be
> somewhat misleading. For instance, it is not show in the output of:
>
> ```
> \df array_*
> ```
>
> The proposed patch renames trim_array() to array_trim(). The old
> function is kept for backward compatibility but is marked as
> deprecated and is left undocumented. It can be removed in 10 years
> from now or so. To my knowledge this is how we typically deprecate old
> functions and operators.
>
> Thoughts?


While unfortunately named, we cannot deprecate TRIM_ARRAY() because it 
is mandated by the standard.

-- 

Vik Fearing




pgsql-hackers by date:

Previous
From: Shubham Khanna
Date:
Subject: Re: Pgoutput not capturing the generated columns
Next
From: Marcos Pegoraro
Date:
Subject: Re: [PATCH] Rename trim_array() for consistency with the rest of array_* functions