So let's step back a bit, get a patch that works for the case where the types match on both sides of the FK, then we review that patch; if all is well, we can discuss the other problem as a stretch goal.
Agreed. This should be a future improvment.
I think the next step should be testing the performnce before/after the modifiactions.