Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t2tY7-008GuK-CR for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Oct 2024 14:38:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t2tY5-008C7c-NI for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Oct 2024 14:38:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t2tY3-008C7S-WF for pgsql-hackers@lists.postgresql.org; Mon, 21 Oct 2024 14:38:21 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t2tY1-002EaW-7i for pgsql-hackers@lists.postgresql.org; Mon, 21 Oct 2024 14:38:19 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id C1D1225400B5 for ; Mon, 21 Oct 2024 10:38:14 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-11.internal (MEProxy); Mon, 21 Oct 2024 10:38:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=compiler.org; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1729521494; x=1729607894; bh=4OJ+3gzGghFnLX+54hkRfMf6ZjmwikBjnmUrAvzG7yE=; b= j5IMrf2hgvtmmAGc3tP8Lc5Gou1tXvKJR2M0WlEj/GZGR7NJYB1tbJyCly21IRln 1Z9oQr/vdp5DsAMYpQusiiekWdaiJ+Z+CVFxKD9HcQ0AiRRnPOTZZKApcWU1wMdH wq299wuNjvoD4+4GPlgulRoqs2DftCkz8OsWVdixljNCcr5mmJXbaOzbCF6XdtGN FI5SnfoM2/WIYruTdeWO6zxclI/NpcCveR86obYC7u6k0lSjhoe1F4HmvCpa+s/M M5mt5ytN7aug/OPCmDAfY6loWWDuo3xvXHaDaXf96NHyx2dbClgMJfyGBuYtLHIb kAm66ALfuO1fCrbvV/ZxgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1729521494; x= 1729607894; bh=4OJ+3gzGghFnLX+54hkRfMf6ZjmwikBjnmUrAvzG7yE=; b=Z KbeKaoup1gIFN/zpTn0oDmLAjyl8vGQ4hei90gDsGm16LbQBmSVnEq6cLDDU+lbn YLlO8GfGulrwPK3/J8roPexfxrLn9DCLP0SAac82NboFZxNTQyYdO5IrNaC/FceM EW1McSItYzSTo3/lz/NIWT3xeoi06UIpBD/IugTquWWNAqlyoRmE6V0FjcfBReA1 NfDG9j017k3FFpDbzxLr2/TQVlUBLthR9h1IZgr/gaWSpPsKmtVYAG+l97icC8ue lDWCg7UVwj7C74aaPa/x03HIN7qWzAb8C+ofRQUucnLDSfnyOWPrwaGk04n49gkH JYLR0PAVTr5AZWMpg3w/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehledgjeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedflfhovghlucflrggtohgsshho nhdfuceojhhovghlsegtohhmphhilhgvrhdrohhrgheqnecuggftrfgrthhtvghrnhepve elffdtiedugfdvgffftddvieevleetieetgfettdffjedtjeefffelhfelffeinecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhovghlsegtoh hmphhilhgvrhdrohhrghdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvg hsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ic6394509:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 659ADB00068; Mon, 21 Oct 2024 10:38:14 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Mon, 21 Oct 2024 16:37:52 +0200 From: "Joel Jacobson" To: pgsql-hackers@lists.postgresql.org Message-Id: In-Reply-To: References: Subject: Re: [PATCH] Add array_reverse() function Content-Type: text/plain Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Oct 21, 2024, at 11:06, Aleksander Alekseev wrote: > Hi, > > Recently I wanted to call array_reverse() and discovered that we still > don't have it. I'm not the first one who encountered this limitation. > array_reverse() was requested at least since 2009 [1] and the > workaround on PostgreSQL Wiki is dated 2010 [2]. > > The proposed patch adds this function. Only the first dimension of the > array is reversed, for consistency with the existing functions such as > array_shuffle() [3]. +1 I've needed this many times. /Joel