Here is my latest reworked patch that fixes all outstanding issues.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных