I wrote:
> Andres Freund <andres@anarazel.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