Would it be appropriate to create a temp table? I wouldn't normally expect pg_dump to create temp tables, but I can't think of a major reason not to.
If not, did you have in mind a CTE with a large VALUES expression, or just a giant IN() list?
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных