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.96) (envelope-from ) id 1vdCJH-00FCkT-1a for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Jan 2026 19:01:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdCJF-00A74z-0v for pgsql-bugs@arkaria.postgresql.org; Tue, 06 Jan 2026 19:01:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdCJF-00A74r-02 for pgsql-bugs@lists.postgresql.org; Tue, 06 Jan 2026 19:01:37 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdCJE-004a05-1M for pgsql-bugs@lists.postgresql.org; Tue, 06 Jan 2026 19:01:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 606J1XuV1609723; Tue, 6 Jan 2026 14:01:33 -0500 From: Tom Lane To: Andres Freund cc: David Rowley , redraiment@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19370: PG18 returns incorrect array slice results when slice bounds depend on another array expression In-reply-to: <1606057.1767724523@sss.pgh.pa.us> References: <19370-7fb7a5854b7618f1@postgresql.org> <1588384.1767715181@sss.pgh.pa.us> <1593905.1767717601@sss.pgh.pa.us> <1606057.1767724523@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 06 Jan 2026 13:35:23 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1609721.1767726093.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 06 Jan 2026 14:01:33 -0500 Message-ID: <1609722.1767726093@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > Andres Freund writes: >> At the very least we need to create a simplified testcase for the bug a= t hand. > Yup, the sudoku example is fun but it seems inappropriate as a test > case. This seems simple enough: regression=3D# with cte as (select array[g,2] as a from generate_series(1,3) g) select a[2], a[(select a[2])] from cte; server closed the connection unexpectedly regards, tom lane