Re: [PATCH] Introduce array_shuffle() and array_sample() - Mailing list pgsql-hackers

From Joe Conway
Subject Re: [PATCH] Introduce array_shuffle() and array_sample()
Date
Msg-id 5550d5cb-ba8a-436b-cb9d-ae638ce13a24@joeconway.com
Whole thread Raw
In response to Re: [PATCH] Introduce array_shuffle() and array_sample()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 7/19/22 10:20, Tom Lane wrote:
> Everything else either explicitly rejects more-than-one-D arrays
> or does something that is compatible with thinking of them as
> arrays-of-arrays.

I think I am responsible for at least some of those, and I agree that 
thinking of MD arrays as arrays-of-arrays is preferable even though they 
are not actually that. Long ago[1] Peter E asked me to fix that as I 
recall but it was one of those round tuits that I never found.

> So I withdraw my original position.  These functions should just
> shuffle or select in the array's first dimension, preserving
> subarrays.  Or else be lazy and reject more-than-one-D arrays;
> but it's probably not that hard to handle them.

+1

Joe

[1] 

https://www.postgresql.org/message-id/flat/Pine.LNX.4.44.0306281418020.2178-100000%40peter.localdomain#a064d6dd8593993d799db453a3ee04d1

-- 
Joe Conway
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Önder Kalacı
Date:
Subject: Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Next
From: Joe Conway
Date:
Subject: Re: let's disallow ALTER ROLE bootstrap_superuser NOSUPERUSER