I want to mention that the current patch does not deal with external parameters ( prepared statements ) [0] [1]. This could be a follow-up, as it may need some further discussion. It is important to address this case, IMO.
[0] https://www.postgresql.org/message-id/CAA5RZ0uGfxXyzhp9N5nfsS%2BZqF5ngEMC3YtBPtLoeK8EPsjHbw%40mail.gmail.com [1] https://www.postgresql.org/message-id/blauoky77sash2qzrbnz6ilfyi7odtvxtdr4ifg4hq4bpqp2uk%406z5yjfsxtcnl Regards, Sami