Re: Adding -E switch to pg_dumpall

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2017-07-20T09:17:50Z
Lists: pgsql-hackers
Hello Michaël-san,

> Attached is a patch to add support for this switch. I am parking that
> in the next CF.

I'm in favor of this feature for consistency with pg_dump, and as the 
environment variable workaround is not specially elegant and can induce 
issues of its own.

Patch applies and compiles.

No special regression tests are provided, but this seems ok to me as it 
just forward the option to pg_dump, which I have no doubt is heavily 
tested. Or not. Anyway it is consistent...

Manually tested with UTF8, latin1 (including conversion errors), non 
existing.

Code is straightforward. Doc and help are both fine.

Ok for me. I switched the status to "Ready for committers".

-- 
Fabien.

Commits

  1. pg_dumpall: Add a -E flag to set the encoding, like pg_dump has.