Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDKwD-00018g-0J for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jul 2022 07:13:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oDKwB-0006en-Sk for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jul 2022 07:13:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDKwB-0006ee-IZ for pgsql-hackers@lists.postgresql.org; Mon, 18 Jul 2022 07:13:03 +0000 Received: from mout-b-206.mailbox.org ([195.10.208.51]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDKw7-0004wp-OU for pgsql-hackers@lists.postgresql.org; Mon, 18 Jul 2022 07:13:01 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-b-206.mailbox.org (Postfix) with ESMTPS id 4LmY861kX5z9sNb; Mon, 18 Jul 2022 09:12:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aboutsource.net; s=MBO0001; t=1658128374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5W0AD5rqZ/sn7ojU4ece5x2AAxnNS/J3GTeXAUK90Yc=; b=EKRFU6dHKb896bR0dUHFsBj1yBIHqPpt0BLbSypml8hf6s+VMxdjYXjCJUY5DZ2d/B91CK W+PShD2Bah+wOYQjz9QbO5oA0oaobFBrV/1la++SjZ/p5ezTK+bsy78vx3/fRC/8T1CVgQ zCqu1GmTMBmGVlLau8PB9K3WiuoHSYrAND5TeegYOsFOaQPotmlI2B3M5qqDGMTWxV0jzc tN8ipnOrYg7mQ6pj6j6oLoxedP4+jdSUOtAuZEzXaWnb+YBb+l4wejH/Dv2zG6J5sJvUo2 9r2N3aJEFrwgyOwoIM2FT65/3mfTU5c5OYj3bW1OezDoIbzJIHWJhJocdz/gPA== Message-ID: <1bebc445-842d-4594-3116-882a3cc13ede@aboutsource.net> Date: Mon, 18 Jul 2022 09:12:50 +0200 MIME-Version: 1.0 Subject: Re: Proposal to introduce a shuffle function to intarray extension Content-Language: de-DE To: Tom Lane Cc: Thomas Munro , PostgreSQL Hackers References: <9d160a44-7675-51e8-60cf-6d64b76db831@aboutsource.net> <4073858.1658027909@sss.pgh.pa.us> <4077925.1658029046@sss.pgh.pa.us> <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> From: Martin Kalcher In-Reply-To: <469954.1658100033@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4LmY861kX5z9sNb List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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