pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedclient_encoding error on load
4+ messages / 3 participants
[nested] [flat]
* client_encoding error on load
@ 2008-08-04 01:59 Andrew Goodnough <agoodno@gmail.com>
2008-08-04 02:38 ` Re: client_encoding error on load Tom Lane <tgl@sss.pgh.pa.us>
2008-08-04 04:23 ` Re: client_encoding error on load Praveen <praveen.k@renaissance-it.com>
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Goodnough @ 2008-08-04 01:59 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: client_encoding error on load
2008-08-04 01:59 client_encoding error on load Andrew Goodnough <agoodno@gmail.com>
@ 2008-08-04 02:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-08-04 04:25 ` Re: client_encoding error on load Andrew Goodnough <agoodno@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Tom Lane @ 2008-08-04 02:38 UTC (permalink / raw)
To: Andrew Goodnough <agoodno@gmail.com>; +Cc: pgsql-admin
"Andrew Goodnough" <agoodno@gmail.com> writes:
> 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 -
Surely the second step must start with gunzip?
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: client_encoding error on load
2008-08-04 01:59 client_encoding error on load Andrew Goodnough <agoodno@gmail.com>
2008-08-04 02:38 ` Re: client_encoding error on load Tom Lane <tgl@sss.pgh.pa.us>
@ 2008-08-04 04:25 ` Andrew Goodnough <agoodno@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Goodnough @ 2008-08-04 04:25 UTC (permalink / raw)
To: pgsql-admin
On Sun, Aug 3, 2008 at 9:38 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Andrew Goodnough" <agoodno@gmail.com> writes:
> > 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 -
>
> Surely the second step must start with gunzip?
>
> regards, tom lane
Yeah, that's gotta be it. Dumb error, thanks.
Andy
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: client_encoding error on load
2008-08-04 01:59 client_encoding error on load Andrew Goodnough <agoodno@gmail.com>
@ 2008-08-04 04:23 ` Praveen <praveen.k@renaissance-it.com>
1 sibling, 0 replies; 4+ messages in thread
From: Praveen @ 2008-08-04 04:23 UTC (permalink / raw)
To: Andrew Goodnough <agoodno@gmail.com>; pgsql-admin
It will better you export and import through network by using following command.
psql -U < schemaname > < databasename> --schema=schemaname | psql -U postgres -h < IP adddress of system where you are importing data> <database name>
----- Original Message -----
From: Andrew Goodnough
To: pgsql-admin@postgresql.org
Sent: Monday, August 04, 2008 7:29 AM
Subject: [ADMIN] client_encoding error on load
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2008-08-04 04:25 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-08-04 01:59 client_encoding error on load Andrew Goodnough <agoodno@gmail.com>
2008-08-04 02:38 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-08-04 04:25 ` Andrew Goodnough <agoodno@gmail.com>
2008-08-04 04:23 ` Praveen <praveen.k@renaissance-it.com>
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