Be very careful in attempting to codify 'correct' behaviour!
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных