Re: array_reverse() - Mailing list pgsql-general

From Merlin Moncure
Subject Re: array_reverse()
Date
Msg-id b42b73150911020617y728e689ch76f2ff56d77aefcf@mail.gmail.com
Whole thread Raw
In response to array_reverse()  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
On Mon, Nov 2, 2009 at 1:49 AM, Craig Ringer
<craig@postnewspapers.com.au> wrote:
>
> Hi all
>
> Before I go ahead and try to write a decent quality version: is there
> any chance an array_reverse() function (in C) would be accepted into Pg
> mainline? If not, I probably won't bother cleaning up my current
> awful-hack quality module.
>
> It's a slow operation to perform in SQL or PL/PgSQL even with 8.4's
> array_agg(...) and generate_subscripts(...) and given how many languages
> seem to provide built-in support it seems to be an operation people need
> quite a bit.

IMO, we should have both that and a string reverse() function.  I just
bumped into the same problem yesterday and was surprised we didn't
have it already.

merlin

pgsql-general by date:

Previous
From: John DeSoi
Date:
Subject: Re: Cancelling Requests Frontend/Backend Protocol TCP/IP
Next
From: Tom Lane
Date:
Subject: Re: array_reverse()