Re: [PATCH] Introduce array_shuffle() and array_sample()

From: Martin Kalcher <martin(dot)kalcher(at)aboutsource(dot)net>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Introduce array_shuffle() and array_sample()
Date: 2022-07-23 12:20:47
Message-ID: 036ba529-1f25-d7b5-c5ad-e6c852d928df@aboutsource.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Am 22.07.22 um 11:31 schrieb Martin Kalcher:
>
> i came to the same conclusions and went with Option 1 (see patch).
> Mainly because most code in utils/adt is organized by type and this way
> it is clear, that this is a thin wrapper around pg_prng.
>

Small patch update. I realized the new functions should live
array_userfuncs.c (rather than arrayfuncs.c), fixed some file headers
and added some comments to the code.

Attachment Content-Type Size
0001-Introduce-array_shuffle-and-array_sample.patch text/x-patch 16.1 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2022-07-23 14:54:08 Re: 20220722-pg_dump: error: invalid number of parents 0 for table
Previous Message Ludwig Isaac Lim 2022-07-23 10:04:24 Strange behavior between timestamp and date comparison

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2022-07-23 15:33:43 Re: Support logical replication of DDLs
Previous Message Amit Kapila 2022-07-23 11:32:02 Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns