| From: | Martin Kalcher <martin(dot)kalcher(at)aboutsource(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
| Cc: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | [PATCH] Introduce array_shuffle() and array_sample() |
| Date: | 2022-07-18 19:03:35 |
| Message-ID: | 1708d95a-629e-5ac5-deab-d20a8d0b2b0e@aboutsource.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers |
Thanks for all your feedback and help. I got a patch that i consider
ready for review. It introduces two new functions:
array_shuffle(anyarray) -> anyarray
array_sample(anyarray, integer) -> anyarray
array_shuffle() shuffles an array (obviously). array_sample() picks n
random elements from an array.
Is someone interested in looking at it? What are the next steps?
Martin
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Introduce-array_shuffle-and-array_sample.patch | text/x-patch | 9.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2022-07-18 19:03:59 | Re: PostgreSQL 14.4 ERROR: out of memory issues |
| Previous Message | Pavel Stehule | 2022-07-18 19:02:57 | Re: PostgreSQL 14.4 ERROR: out of memory issues |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jacob Champion | 2022-07-18 19:04:04 | Re: Commitfest Update |
| Previous Message | Jacob Champion | 2022-07-18 19:02:24 | Re: Commitfest Update |