Re: array_random - Mailing list pgsql-hackers

From Tom Lane
Subject Re: array_random
Date
Msg-id 346143.1753069752@sss.pgh.pa.us
Whole thread Raw
In response to Re: array_random  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
jian he <jian.universality@gmail.com> writes:
> Does performance and other factors justify adding array_random?

There hasn't really been field demand for such a function, AFAIR.
There's an infinite amount of stuff that would be faster if coded
in C than if written in SQL or plpgsql.  We can't support it all,
so we need some fairly high bar to accepting what functionality
we'll support.

In the case at hand, "fill a 1-D array with random values" is
quite trivial to do in either SQL or plpgsql.  However, "reshape
an array to have such-and-such dimensions" isn't.  So in the abstract
I'd be more sympathetic to inventing a function that can do reshaping.
But there is still the question of whether anybody really needs that
functionality.

            regards, tom lane



pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: array_random
Next
From: Amit Kapila
Date:
Subject: Re: Conflict detection for update_deleted in logical replication