Re: BUG #19370: PG18 returns incorrect array slice results when slice bounds depend on another array expression

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, redraiment(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19370: PG18 returns incorrect array slice results when slice bounds depend on another array expression
Date: 2026-01-06 19:01:33
Message-ID: 1609722.1767726093@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
>> At the very least we need to create a simplified testcase for the bug at hand.

> Yup, the sudoku example is fun but it seems inappropriate as a test
> case.

This seems simple enough:

regression=# 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2026-01-07 01:04:15 Re: BUG #19370: PG18 returns incorrect array slice results when slice bounds depend on another array expression
Previous Message Tom Lane 2026-01-06 18:35:23 Re: BUG #19370: PG18 returns incorrect array slice results when slice bounds depend on another array expression