Re: BUG #16801: Invalid memory access on WITH RECURSIVE with nested WITHs
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alexander Lakhin <exclusion@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2021-02-25T00:36:26Z
Lists: pgsql-bugs
Attachments
- bug-16801-fix.patch (text/x-diff) patch
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
Commits
-
Fix list-manipulation bug in WITH RECURSIVE processing.
- 80ca8464fe02 14.0 landed
- 49076fd3ba6b 13.3 landed