+1 for fixing this in the backend code rather than FDW code.Thanks, Richard, for working on this. The patch looks good to me at a glance.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных