pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martin Kalcher <martin.kalcher@aboutsource.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Proposal to introduce a shuffle function to intarray extension
Date: Mon, 18 Jul 2022 09:12:50 +0200
Message-ID: <1bebc445-842d-4594-3116-882a3cc13ede@aboutsource.net> (raw)
In-Reply-To: <469954.1658100033@sss.pgh.pa.us>
References: <9d160a44-7675-51e8-60cf-6d64b76db831@aboutsource.net>
	<CA+hUKGJFYY6s4nxDRz+PTLNYeUkZJJn_7+iMJoaQeRp5hKz0aQ@mail.gmail.com>
	<b8f44b53-02d6-0be4-42df-cb6f737e6267@aboutsource.net>
	<4073858.1658027909@sss.pgh.pa.us>
	<4077925.1658029046@sss.pgh.pa.us>
	<CA+hUKGLcjrJ9Q2OZAKHN-SQyq_m5QDv8d3WKHYq5HW8Lyozu4w@mail.gmail.com>
	<5ef15c6f-e108-53af-3d82-587fac394f1a@aboutsource.net>
	<463181.1658097987@sss.pgh.pa.us>
	<5b7a1ee9-f942-2502-3a0c-e9fc12511139@aboutsource.net>
	<469954.1658100033@sss.pgh.pa.us>

Am 18.07.22 um 01:20 schrieb Tom Lane:
>> I would expect that shuffle() only shuffles the first dimension and
>> keeps the inner arrays intact.
> 
> This argument is based on a false premise, ie that Postgres thinks
> multidimensional arrays are arrays-of-arrays.  They aren't, and
> we're not going to start making them so by defining shuffle()
> at variance with every other array-manipulating function.  Shuffling
> the individual elements regardless of array shape is the definition
> that's consistent with our existing functionality.

Hey Tom,

thank you for clarification. I did not know that. I will make a patch 
that is using deconstruct_array().

Martin





view thread (25+ messages)  latest in thread

Message-ID: <1bebc445-842d-4594-3116-882a3cc13ede@aboutsource.net>
Permalink:  ../1bebc445-842d-4594-3116-882a3cc13ede@aboutsource.net/
Also on:    postgresql.org/message-id/1bebc445-842d-4594-3116-882a3cc13ede@aboutsource.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: martin.kalcher@aboutsource.net, tgl@sss.pgh.pa.us, thomas.munro@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Proposal to introduce a shuffle function to intarray extension
  In-Reply-To: <1bebc445-842d-4594-3116-882a3cc13ede@aboutsource.net>
  References: <9d160a44-7675-51e8-60cf-6d64b76db831@aboutsource.net> <CA+hUKGJFYY6s4nxDRz+PTLNYeUkZJJn_7+iMJoaQeRp5hKz0aQ@mail.gmail.com> <b8f44b53-02d6-0be4-42df-cb6f737e6267@aboutsource.net> <4073858.1658027909@sss.pgh.pa.us> <4077925.1658029046@sss.pgh.pa.us> <CA+hUKGLcjrJ9Q2OZAKHN-SQyq_m5QDv8d3WKHYq5HW8Lyozu4w@mail.gmail.com> <5ef15c6f-e108-53af-3d82-587fac394f1a@aboutsource.net> <463181.1658097987@sss.pgh.pa.us> <5b7a1ee9-f942-2502-3a0c-e9fc12511139@aboutsource.net> <469954.1658100033@sss.pgh.pa.us> <1bebc445-842d-4594-3116-882a3cc13ede@aboutsource.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox