Hi Erik, > Thank you all for the feedback and insights. > > Yes, the intention is to *replace* expand_inherited_rtentry() in the same way > planner_hook replaces standard_planner().
This patch probably doesn't need yet another reviewer, but since there is a little controversy about if the hook should replace a procedure or be called after it, I decided to put my two cents in. The proposed approach is very flexible - it allows to modify the arguments, the result, to completely replace the procedure, etc. I don't think that calling a hook after the procedure was called (or before) will be very useful. The patch applies to `master` branch (6d177e28) and passes all the tests on MacOS. -- Best regards, Aleksander Alekseev