On Tue, Nov 29, 2022 at 12:22 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Actually ... it seems like we could just drop that Assert, as per revised argument in the comment. This'd explain the lack of field complaints: there's no bug in a production build.
Ah yes, that's right. We can be sure that above the semijoin there would be no reference to its RHS. And the PHV in semijoin's qual seems unnecessary.
This reminds me of another question I had about unwrapping unnecessary PHVs [1]. Sad that we don't have infrastructure for that.