As for the proposed patch, the following part should handle the temp tables too:
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных