Re: BUG #16801: Invalid memory access on WITH RECURSIVE with nested WITHs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16801: Invalid memory access on WITH RECURSIVE with nested WITHs
Date: 2021-02-25 00:36:26
Message-ID: 31724.1614213386@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> Surely that breaks things entirely (if it doesn't, then we are badly
> under-testing this area). A nil list is just a null pointer, so
> appending to "new_cte_list" later isn't going to affect what was
> previously put into the innerwiths list.

Here's a patch that I think fixes it correctly, including a test
case that doesn't work with your patch.

regards, tom lane

Attachment Content-Type Size
bug-16801-fix.patch text/x-diff 3.3 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ryan Vinzent 2021-02-25 00:39:00 Re: Bug: Cannot insert multiple records using DEFAULT keyword for generated column
Previous Message Tom Lane 2021-02-24 22:05:29 Re: Bug: Cannot insert multiple records using DEFAULT keyword for generated column