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 1oD0PJ-0001DF-NK for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Jul 2022 09:17:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oD0OI-0002kt-LK for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Jul 2022 09:16:42 +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 1oD0OI-0002f0-6B for pgsql-hackers@lists.postgresql.org; Sun, 17 Jul 2022 09:16:42 +0000 Received: from mout-b-105.mailbox.org ([195.10.208.50]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oD0OA-0007nl-Rv for pgsql-hackers@lists.postgresql.org; Sun, 17 Jul 2022 09:16:40 +0000 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (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-105.mailbox.org (Postfix) with ESMTPS id 4Llzx9490Cz9skt; Sun, 17 Jul 2022 11:16:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aboutsource.net; s=MBO0001; t=1658049389; 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=iciR2xM6BmQ0Lijp6dI1QErMK2eeI1yXmAd5YXOf9A8=; b=Es23iYRLm9gPj2Rq6D3xLcM2TinrRm57WYzqwCA1pK4zQ73Aa2uRkuBWKy28OvBrWutVKG /WhFXsPd2pMxvhcb/f0pkj76zmoCgfOneUL9qS/5L4z7seOQTJmJR5BNdLJ5UGvJWqGuUz pF0RpBAAEnsSF6V+TfR92N5c8HAtnRefa000FGmHH4SorxDE7tatwP3J7OYoNAAf2NdLoo olJeavVAvD6q4Sbp9LiYnEYlM0gaCw+g2j6WPvY7h4k8ha6vVhx4qdzYuzXQ70LMxAnlQV OSOH7Y2CT070nH7QpC7yRN//MFm/JUV+aK9PPNHUadpj3APQGLfPBFZoEUD85A== Message-ID: Date: Sun, 17 Jul 2022 11:16:28 +0200 MIME-Version: 1.0 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> From: Martin Kalcher Subject: Re: Proposal to introduce a shuffle function to intarray extension In-Reply-To: <4077925.1658029046@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Llzx9490Cz9skt List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Am 17.07.22 um 05:37 schrieb Tom Lane: > > Actually ... is there a reason to bother with an intarray version > at all, rather than going straight for an in-core anyarray function? > It's not obvious to me that an int4-only version would have > major performance advantages. > > regards, tom lane Hi Tom, thank you for your thoughts. There are two reasons for choosing an int4-only version. I am not familiar with postgres development (yet) and i was not sure how open you are about such changes to core and if the proposed feature is considered valuable enough to go into core. The second reason was ease of implementation. The intarray extension does not allow any NULL elements in arrays and treats multidimensional arrays as though they were linear. Which makes the implementation straight forward, because there are fewer cases to consider. However, i will take a look at an implementation for anyarray in core. Martin