The workaround I mentioned in the previous message doesn't turn out to work after all. The series of statements seems to require explicitly calling two functions.
pgsql-sql by date:
Соглашаюсь с условиями обработки персональных данных