| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add array_sample() and array_shuffle() functions. |
| Date: | 2023-04-07 15:47:10 |
| Message-ID: | E1pkoIv-001sfc-08@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Add array_sample() and array_shuffle() functions.
These are useful in Monte Carlo applications.
Martin Kalcher, reviewed/adjusted by Daniel Gustafsson and myself
Discussion: https://postgr.es/m/9d160a44-7675-51e8-60cf-6d64b76db831@aboutsource.net
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/888f2ea0a81ff171087bdd1c5c1eeda3b78d73d4
Modified Files
--------------
doc/src/sgml/func.sgml | 44 ++++++++-
src/backend/utils/adt/array_userfuncs.c | 166 ++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 6 ++
src/test/regress/expected/arrays.out | 54 +++++++++++
src/test/regress/sql/arrays.sql | 14 +++
6 files changed, 284 insertions(+), 2 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2023-04-07 17:29:35 | pgsql: Doc: improve descriptions of max_[pred_]locks_per_transaction GU |
| Previous Message | Tom Lane | 2023-04-07 14:35:14 | pgsql: Fix locale-dependent test case. |