I've applied this patch with revision to put the hook where I thought it
made sense. Attached is a modification of your dummy.c to show use of
the hook. I didn't test it heavily, but I did check that it seemed to
work with either order of calling geqo() and standard_join_search().
regards, tom lane