pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Goodnough <agoodno@gmail.com>
To: pgsql-admin@postgresql.org
Subject: client_encoding error on load
Date: Sun, 3 Aug 2008 20:59:27 -0500
Message-ID: <f93eaa100808031859y1c019fcbocc7a58d01c67d488@mail.gmail.com> (raw)

I'm using these commands to perform a dump and load.

pg_dump -c lakevie_typo | gzip > $HOME/backups/typo_$DATE.sql.gz
gzip < $HOME/backups/typo_$DATE.sql.gz |psql -d lakevie_typobak -f -

The dump is fine but the load only works if I first extract the sql, then
run it.  Running it using the pipe to psql, I get:

psql:<stdin>:71: ERROR:  invalid byte sequence for encoding "UTF8": 0x8b
HINT:  This error can also happen if the byte sequence does not match the
encoding expected by the server, which is controlled by "client_encoding".

yet, doing a 'psql -l' shows this database to be UTF-8.  And the dump file
says:

SET client_encoding = 'UTF8';


My goal is to get the two line dump/load working so I don't have any manual
steps and sql files laying around.  Any ideas?

Andy

view thread (4+ messages)  latest in thread

Message-ID: <f93eaa100808031859y1c019fcbocc7a58d01c67d488@mail.gmail.com>
Permalink:  ../f93eaa100808031859y1c019fcbocc7a58d01c67d488@mail.gmail.com/
Also on:    postgresql.org/message-id/f93eaa100808031859y1c019fcbocc7a58d01c67d488@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: agoodno@gmail.com
  Subject: Re: client_encoding error on load
  In-Reply-To: <f93eaa100808031859y1c019fcbocc7a58d01c67d488@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox