Re: [PATCH] Rename trim_array() for consistency with the rest of array_* functions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Rename trim_array() for consistency with the rest of array_* functions
Date: 2024-11-04 05:49:39
Message-ID: Zyhgc7iYsunkT0_f@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 29, 2024 at 03:23:15PM +0300, Aleksander Alekseev wrote:
>> While unfortunately named, we cannot deprecate TRIM_ARRAY() because it
>> is mandated by the standard.
>
> I didn't know that, thanks.

Wow. Neither did I.

> Still PostgreSQL doesn't follow the standard precisely in more than
> one respect. Perhaps we should add array_trim() and keep both? Or
> (less likely) remove trim_array() and document this deviation from the
> standard? Or at least document why it's named this way.

I suspect that it is not the only function in this case, and that we
don't document that it is in the standard. I would suggest to let
things the way they are on HEAD and withdraw the patch.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-11-04 06:04:09 Re: pgsql: Implement pg_wal_replay_wait() stored procedure
Previous Message Michael Paquier 2024-11-04 05:46:39 Re: general purpose array_sort