Could you reduce this to a self-contained example please? Yourfunctions depend on a bunch of tables that you have not provideddefinitions or data for ...
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных