Here is what I meant to do earlier. As it turns out, this patch has not been merged yet.
This is a rebased version . Even though I labelled it “v3”, there should be no changes from “v2”.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных