Re: Proposal to introduce a shuffle function to intarray extension

From: Martin Kalcher <martin(dot)kalcher(at)aboutsource(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal to introduce a shuffle function to intarray extension
Date: 2022-07-18 07:47:30
Message-ID: f36445ec-aad9-0531-39f8-ca3a3bb4860e@aboutsource.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Am 18.07.22 um 01:20 schrieb Tom Lane:
> (Having said that, even if we were going to implement it with that
> definition, I should think that it'd be easiest to do so on the
> array-of-Datums representation produced by deconstruct_array.
> That way you don't need to do different things for different element
> types.)

Thank you Tom, here is a patch utilising deconstruct_array(). If we
agree, that this is the way to go, i would like to add array_sample()
(good name?), some test cases, and documentation.

One more question. How do i pick a Oid for the functions?

Martin

Attachment Content-Type Size
0001-introduce-array_shuffle.patch text/x-patch 2.6 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daulat 2022-07-18 07:55:30 More than one Cluster on single server (single instance)
Previous Message Martin Kalcher 2022-07-18 07:12:50 Re: Proposal to introduce a shuffle function to intarray extension

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2022-07-18 08:05:23 Re: [RFC] building postgres with meson - v10
Previous Message Richard Guo 2022-07-18 07:13:05 Re: Problem about postponing gathering partial paths for topmost scan/join rel