daniel alvarez <d-alvarez@gmx.de> writes:
>> Not ugly, but a little noisy. However, my idea of having a single SET
>> at the top is never going to work, so I don't have a better idea.
> Why isn't this done on a per-session basis?
Because pg_dump can't know what the session default will be when the
dump is reloaded. The scheme you are proposing will only succeed in
making pg_dump unreliable.
regards, tom lane