Re: [PATCH] Add array_reverse() function - Mailing list pgsql-hackers

From Joel Jacobson
Subject Re: [PATCH] Add array_reverse() function
Date
Msg-id d3adaa8b-8400-47fb-ae7e-c8423cc977fd@app.fastmail.com
Whole thread Raw
List pgsql-hackers
On Mon, Oct 21, 2024, at 11:06, Aleksander Alekseev wrote:
> Hi,
>
> Recently I wanted to call array_reverse() and discovered that we still
> don't have it. I'm not the first one who encountered this limitation.
> array_reverse() was requested at least since 2009 [1] and the
> workaround on PostgreSQL Wiki is dated 2010 [2].
>
> The proposed patch adds this function. Only the first dimension of the
> array is reversed, for consistency with the existing functions such as
> array_shuffle() [3].

+1

I've needed this many times.

/Joel





pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [PATCH] Add array_reverse() function
Next
From: "Joel Jacobson"
Date:
Subject: Re: New "raw" COPY format