Tom Hart <tomhart@coopfed.org> writes:
> Tommy Gildseth wrote:
>> Try editing your dump-file and change the line which reads "SET
>> client_encoding = 'SQL_ASCII';" to "SET client_encoding = 'LATIN1';"
>>
> I tried making the changes you specified with notepad, wordpad, gVim,
> vim and emacs and in each case pgAdmin (and pg_restore) complain about
> the dump header being corrupted.
You can't really manually edit a custom or tar-format archive.
What you'll need to do is use pg_restore to emit a plain SQL script
from the archive, then edit that, then load it via psql (NOT pg_restore).
regards, tom lane