attached is v9 of the patch, modified along the lines of Tom's comments:
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных