Hi!
I also worked with this patch and until your explanation I didn’t fully
understand the reasons why it was wrong to have this implementation when
removing duplicate OR expressions.
Thank you, now I understand it!
I agree with explanation of Andrei Lepikhov regarding the fact that
there were difficulties in moving the patch to another place and
the explanation of Alexander Korotkov and Peter Geoghegan regarding the
need to apply this transformation.
Let me just add that initially this patch tried to solve a problem where
50,000 OR expressions were generated and
there was a problem running that query using a plan with BitmapScan. I
wrote more about this here [0].
If the patch can be improved and you can tell me how, because I don’t
quite understand how to do it yet, to be honest, then I’ll be happy to
work on it too.
[0]
https://www.postgresql.org/message-id/052172e4-6d75-8069-3179-26de339dca03%40postgrespro.ru
--
Regards,
Alena Rybakina
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company