Viktor The quick and dirty method would be to pass the subquery as a string, then execute the subquery in the function. Will T
pgsql-general by date:
Соглашаюсь с условиями обработки персональных данных