The patch was not getting applied. Was seeing below message: postgresql$ git apply /Downloads/unchanged.patch error: src/backend/utils/adt/ri_triggers.c: already exists in working directory
Have come up with attached patch which hopefully should not have missed any of your changes.
Thank you for doing that. What command did you use? I followed the procedure on the wiki [1] but I must be doing something wrong.