Re: BUG #16006: Update queries fail on a table having any policy with a function that takes a whole-row var as arg
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vinay Banakar <vinay.s.banakar@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, pgsql-bugs@lists.postgresql.org
Date: 2019-09-13T04:29:17Z
Lists: pgsql-bugs
Vinay Banakar <vinay.s.banakar@gmail.com> writes: > Thank you for finding the root cause, I just checked on 9.15.17 and it is > still failing here also. > But I distinctly remember it working earlier, not sure which version of pg > (at least <9.5.16) though as I have lost that earlier setup. Oh! I misread your report as being that it worked on 9.5.x and failed on 9.6.x. If it really did work on some earlier 9.5.x version, then we must've busted it with a patch ... but what? That bizarre code in ExecEvalWholeRowVar is much older than 9.5 (looks like it dates to 8e617e29a), and the mistake proper goes back to the introduction of WITH CHECK OPTION in 9.4 (4cbe3ac3e). I'm not seeing any other moving parts here. regards, tom lane
Commits
-
Fix usage of whole-row variables in WCO and RLS policy expressions.
- b54cff2bf32d 10.11 landed
- 64d926f2b073 11.6 landed
- 7f1f72c44400 13.0 landed
- ca08ea52bfbc 9.4.25 landed
- b00132b9a2b5 9.6.16 landed
- aee5736f1540 9.5.20 landed
- 5e9b18c78789 12.0 landed