Andrew Dunstan <andrew@dunslane.net> writes:
> Hmm. Could we not just add something this condition:
> or pg_catalog.format_type(prorettype, NULL) != 'language_handler'
> in pg_dump.c around line 2191?
You forgot about the validators, which are not so easily identified.
regards, tom lane